use min.apply to get min number