added time constraints to ordering