fix metadata function, must return dict of strings