add integer comparison algorithm