modified crt to have an optional reset handler hook