resizing and shifting of cells