adding elements index