def has a bug but the heap is there