register and unregistering package