removed old code and fixed the old, stupid way of handling resizing