added get element by index method