added calculation of race