min and max, as requested by #128