Update to use metadata