Added the resize method