add support for metadata in plans