modify the context in index