fixed the format string for the main loop.