replaced the use of time.time with timeit.default_timer