unsafe the resize method