metadata is undefined here