added ability to unregister entity