added tree structure for serialization of request