fixed the performance testing code