modified generate to display tokens