refactor the timings example