changing index in scope insidebrackets