added support for AND and OR