cleaned up resizing