change resize method