added a generic_hook