change layout functionality