changed all compare to this->compare