new hook refactor