Implemented btree, probably works...