add index to category array