solved bug with replacement pairs and distance=2
Merge pull request #31 from jaumeortola/master

solved bug with replacement pairs and distance=2