common temporal order function