add afterHook
add docs/example for afterHook