turn root_hash into a function
move foldr into Hasher and don't use reduce