trim metadata