add metadata option
as index, ecc
update test with metadata option