exporting stripMetadata function