added tokenization and a for-each loop over the tokens