multi-sentence encode/decode tested

errors fixed, multi-sentence encode/decode now works as specified. TUT
tested.