corrects and filter by time