added the deregister method to the class