moves FormatTime out of data finding loop