Wrote CSV code