public void check(int bpm) {
        //check if it's to high
        if (bpm > high) {
            activate();
            ishigh = true;
        } //check if it's to low
        else if (bpm < low) {
            ishigh = false;
            activate();
        } else {
            deactivate();
        }
        //pop up's with the alarm
        if (active()
                && ishigh) {
            JOptionPane.showMessageDialog(null, "ALERT: HEART BEAT TOO HIGH");
            alarm = "ALERT: TOO HIGH, started at : " + st + ",stopped at :" + s;
        } else if (active()
                && !ishigh) {
            JOptionPane.showMessageDialog(null, "ALERT: HEART BEAT TOO LOW");
            alarm = "ALERT: TOO LOW, started at : " + st + ",stopped at :" + s;
        }
    }