added new method 'updateLayout'