implemented run time measurement