refine resize and initial size