adding race average code