Change the name of min and max variables into minimum and maximum to avoid potential side-effects