modfied setRule to use operator value instead of type