added benchmarking to testing code