change getElementByIndex to get