javascript code for Natalies metadata example