order by added to query to get latest numbers
array changed to save latest csv file to db