adding start-at-time and end-at-time constraints, and logging