Update index.md

Consistency between code sample and illustrative text