the heap question stems from this code, fyi