added support for hooks for repositories and models (#8)