refactor changes
utils refactoring, date fns, and ordering