Slopegraph implementation