fixed bug with delay, needs float