Adding dynamic resizing