replacing old 'and', 'or', 'not' with functional ones