Resize function added.