schedules loop now working