updaing pivot to use csv gem