tree init for flag resr