Methods max, min added with its tests