add lateral compare