adjacencymatrix passing tests