Change hashset to treeset