updated hook