added ordering time allowed function