add some hooks and update doc