TreeMap fixed; passed ZhuRen's test
seems finished