added get_end_time method