Added type signature for renderTree