added heapstack and struct in C and removed resume