change index in stack base