adjusted timing test code