implemented CSV download