refactor callback installation/desinstallation