Calculated the index of next elem first and then fetches the element