setup group hierarchy