move penalty code to a timer method