first method: resize()