implement popup win, popup lose