implemented most of the token processing features from project 2 in NodeJS