resizing now works in a semi elegant way, leaving debug print statements because I dont trust this thing yet