add more documentation and examples for hooks