rigSchedule function added...first draft