little improvement on saving to csv