added findIndex method