reworking treebook stuff