adjacency as a mtrix