rewrote clean_data using data function from fast_solution