Use a hook instead of an advice