Resizing function added.