pulled out metadata functions