implemented _add_hooks and _try_hook