rewrite csv->png part with class