Add support for hooks #12