ensure that the csv import gets saved at the appropriate time
refactor