check hierarchy mistakes and work on upgrade