csv functionality basic and now working