fixed indicator function