complete insert routine
add public API for Btree