word_smith.c code condensed