check index
Change var naming