substitute_at no longer takes an index