adjusted to new version of clean_data