old cost model
added visualizer