Improve setRace method