cur<= pre only add pre; else add (cur- pre)