add doc for DEREF
finish test for tree