Changed code for timing test