updated data cleaning R file