contain and contain_exactly refactor