more work on the metadata system