add function for benchmarking