added metaReplace and metaReplacement options