add more tree states and convert protobuf types