Added query for db