writing some benchmarking code for problem 3