added negative index elim