implemented least_remaining_time