rewrite most hash -d
add submodule z
add z, fix some