initialize layout in 2 groups

but each group should only change layout once, for performance issue
---- changing layout is slow