introduces HeapEntry type, since Entry is final