add the targetCompare function