refactor BinarySearchTreeInsert