Added timebased function for race