changed the way a new day are checked in optionalTasks