add invalid direction testcase + minor fixes
Add test case + support nested function execution
Fix last_instr behavior
Doc
refactor test
usecase with event store