implement popup error;
implement game end