generate tree resource