using data structure: list, BST to sorting info.