Finished first version, successfully tested using /usr/share/dict/words