dynamic rebuild layout