refactored skip with time
refactored groupByUntil