updated number printing to retire snprintf