added timelapse functionality