Updaing AStart to work with the adj. list