a few changes for the phonetic encoder