Adding SetIndex method.