updated heapstack and static/scope