started findLastIndex function