Change the way of constructing TreeMap