add index for command