simplified graph class