optimize the printf