writing data like stats