started findIndex function