add a sample implementation in Titan, simplify the graph interface