tried to implement state matrix but not working yet.
State matrix building machanism is now working.
Before switch to shared pointer
Implemented all states but comment.
stateMatrix building mechanism completed. Untested.
Implemented getToken() and main().Dealted with corner cases in the stateMatrix.