Implemented a tree set