improved csv export

closes #49