added dynamic time, needs more accuracy