How to use boolean function inside class in Arduino for MPR121?

I am making a library for the MPR121 sensor and in that I want to use a bool function inside a class in Arduino IDE but it is not working. Here’s my code.

#include <Wire.h>
#include "Adafruit_MPR121.h"
#ifndef _BV
#define _BV(bit) (1 << (bit)) 
Adafruit_MPR121 cap = Adafruit_MPR121();
uint16_t lasttouched = 0;
uint16_t currtouched = 0;

class PaperTron {
         uint8_t i;
         uint8_t a;

void touchBegin(){
  Serial.println("Hi! I'm PaperTron.");
  if (!cap.begin(0x5A)) {
  Serial.println("Error! TOUCH pins not found. Please check wiring.");
  while (1);
  Serial.println("Hurray! Now you can use my TOUCH pins.");

**//This is the boolean function which is not working**
bool isHigh(uint8_t touchpin) {
  currtouched = cap.touched();
  for (i=0; i<12; i++) {
    if ((currtouched & _BV(i)) && !(lasttouched & _BV(i)) ) {
      if(i==touchpin) return true;  
      if (!(currtouched & _BV(i)) && (lasttouched & _BV(i)) ) {
      if(i==touchpin) return false;
  lasttouched = currtouched;

PaperTron papertron;
void setup() {

void loop() {

The serial monitor is showing “Hello” continuously whereas it should print “Hello” only when I press the touch pin on MPR121.

what does isHigh() return if neither if condition is true?