modify return type of method deregister.