new get_metadata method