extract metadata