resizing code
small cganges