restructure hierarchy