added time lapse to js