test for 'and and 'or