implement race()