Revert "replace with index"

This reverts commit dcf887d9a6d90af9818538a3c849c0f93f3e8684.