cleaned up some code, first working race version