Added the adj method to the Graph class