add hierarchy method