update the hierarchy