lzw added, not efficient though