implemented 'and' and 'not' operation