deregistering events and tests