working on lab5 adjacency matrix