add deactivation hooks & save reference link