using wrong index