adding part 3 of document tagger Gutenberg Project which converts part
2 code to functions