add init params for ToIndexForward and update indexTemplate