simple graph class