add func set new frame by click and change to work out frame