consolidate the resize
little refactor

-adds console.log to confirm (commented out)
-change the var names to be consistent