Implemented getToken method
Adjusted token assignment process