collector and writer for simple statistics