added lzw straightforward impl