merge merkle tree

- adding  PR for comments
use the same trick as earlier, inlining the comparison to the function parameter.