Added the max, the min and the successor functions.