added addQuery parameter to add dbs instance