introduce trimgraph