add index to key