re-impl based on tree
updated case
simple context reuse
rest of test cases