typo with $index