clean_name function changed