made csv download base class more flexible