added finding the day of the week for database queries