add condition to hurting in punishment service and style fixes