gather before hooks.