statistics generation