heap and heap spec