lastIndex without using zip