reworked the metadata spec and added a test