replaced IndexConstant with StaticIndex