changed model to account for times, added additional functionality