get an index for candidates