Finished simple case for one time interval, bug exists