define indicator function