Made changes to print_token