added logic to parse and return base tree