minimal safe and sane btree impl