added an option useindex to use index and not dim values