update get_unique_name function to remove some characters