added docs, corrected some problems in rbt, still not working