keep internal index in sync with next(functionName)
keep internal pointer in sync with next('functionName') calls