adding csv functionality