cleaned up resize