refactored working day handling