updated data cleaning functions