creating csv formatted data