cross/contain test function