Abstracted a bit of common code in race