re-factored generateSchedule method to tasks model as static method