fix typo
finish allowing access both by index and name