finished btree insert algorithm