Use new metadata method

Updated example to use the new metadata method