Added support for hooks