Finding the position of an element