added support for custom collection and document controllers