There are two <<- assigns in this function. The logic needs to be worked out and reflected in the user code and how this is called.