added support for OR AND query processing