added csv writer
added csv writer script and histogram