Refactored code and added day of week and day of month