adds binary tree and tests

useful for debugging but probably not something you'd want to do in a normal library function.