refactoring, renaming, proper grouping by day