Added capability to set index of option