Added support for scala for hooks