Added support for querying on collection