Updated so intervals pulled both start and end time from database