change resize function