add function to create token dictionary