making sure its in original state before branching
made createPairings its own function