commit #5 new implementation with TreeSet and Hashtable