matrix and graph are working now...