Added resize method.