change signatures of registerinstances and deregisterinstances methods.