I believe this is the correct logic for colliding time periods