modifs on the data clean method (implemented recursion)