hash encoding tweaks