resizing function was added