finished basic graph class