presubmit to j discrete algorithm