generating intermediate combinations correctly, I think