added a contains method to MatQuery and a test for it