heap refactor; ask don't tell