added the resize feature