add csv download functionality