completed write to csv