Added possibility to provide query when reading from mongo collection