replace heirarchy