improved performance by precompiling format string