public void addWordToStatistic(boolean correct) {
        Connection conn = null;
        PreparedStatement pStat = null;
        try {
            conn = DriverManager.getConnection(Utils.DB_URL);
            Statement stat = conn.createStatement();
            ResultSet resultSet = stat.executeQuery("SELECT word_id, user_id, word_id, correct, incorrect, section_id FROM Statistic WHERE word_id = " + wordIDList.get(currentWordID) +" AND user_id= "+ user.getUser_id() +"");
            if (!resultSet.next()) {
                pStat = conn.prepareStatement("INSERT INTO Statistic (word_id, section_id, correct, incorrect, user_id) VALUES (?, ?, ?, ?, ?)");
                pStat.setInt(1, wordIDList.get(currentWordID));
                pStat.setInt(2, SelectSection.getSelectedSectionID());
                if (correct) {
                    pStat.setInt(3, 1);
                    pStat.setInt(4, 0);
                }
                else {
                    pStat.setInt(3, 0);
                    pStat.setInt(4, 1);
                }
                pStat.setInt(5, user.getUser_id());
            }
            else {
                int correct_num = (resultSet.getInt("correct") + 1);
                int incorrect_num = (resultSet.getInt("incorrect") + 1);
                System.out.println(correct_num + " " + incorrect_num);
                if (correct) {
                    pStat = conn.prepareStatement("UPDATE Statistic SET correct = " + correct_num +" " +
                            "where word_id = " + wordIDList.get(currentWordID) + " AND user_id = "+ user.getUser_id() +"");
                }
                else if (!correct) {
                    pStat = conn.prepareStatement("UPDATE Statistic SET incorrect = " + incorrect_num +" " +
                            "where word_id = " + wordIDList.get(currentWordID) + " AND user_id = "+ user.getUser_id() +"");
                }
            }
            pStat.execute();
            System.out.println("executed");
        } catch (SQLException e) {
            e.printStackTrace();
        }
        finally {
            try {
                conn.close();
                pStat.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
    }