use mapping from callstack to predecessor nodes to simulate context