building the merkel hash