c version now prints min time