-working example of generation class from root node