added updateLayout