fixed a few bugs, the AVLTree will come!