time measurement
penalty calc