put [method, pre value] in a sorted map.
ns for generating the graph