Extended the 'and' test