replace rawQuery() with query()
remove legacy code