function to remove strings containing underscores