implemented visualization method for hierarchies