cc appealed: improving algorithm to test set 1
Renaming two functions