modify store structure from hasmap to RedBlackBst to make sure linearithmic space