added code to create hierarchy in VC++