export statistics to CSV. ugly