initial version of working days function