Add stack to getNextState

I added the stack so that I can add more tokens easily to the getNextState method.