Updated Logical Comparison

Updated the logical method of comparison.