made tryAlignments try any pair of nodes at most once