improved archiveMetadata handeling - still wip