contraction can be done more efficiently

too many permutations