csv export - the first working version