added support for metadata