modify binary tree sort