1. Instead of copy-paste coding figure out how to update condition if for(...) statement so that end time gets included.
1. It would be nice to add unit test to cover changes.