fixes anonymous function and changes time number in the return