added check for viability in pairs in compare script.