updated the hook