minimum function do.