Changing index for isRight and isLeft