added time measurement