rename index -> encoding and use node-shims