add type parsing in metadata