Added a method that finds the correct index,

for the definition of an element.