added term comparisons and abs