eliminate new_race array in favor of a function (TODO: make it fast)