classes edge and graph