made resizing completely modular