made baseMessageTree functional