refactoring adjacent list,using values.txt