refactored and winner id and race time saves to db