adding compares logic