descending order applied to csv generating function