time based looping added