added defines, contains and compare query terms, as yet unused