adding constraints to schedule