added get_times function