```\nuint \_idx = \_index;\nbytes32 \_root = \_proof.slice(\_proof.length - 32, 32).toBytes32();\nbytes32 \_current = \_proof.slice(0, 32).toBytes32();\n\nfor (uint i = 1; i < (\_proof.length.div(32)) - 1; i++) {\n    if (\_idx % 2 == 1) {\n        \_current = \_hash256MerkleStep(\_proof.slice(i \* 32, 32), abi.encodePacked(\_current));\n    } else {\n        \_current = \_hash256MerkleStep(abi.encodePacked(\_current), \_proof.slice(i \* 32, 32));\n    }\n    \_idx = \_idx  1;\n}\nreturn \_current == \_root;\n```\n