adjacency matrix mostly implemented (some tests failing)