adding register and unregister for external instances