replaced dumb Race.compare implementation with a less-dumb one