More algorithm work

Starting implementing logic for algorithm and tried to account for cars
with same HR