some cleaning up+adding of graph stuff