addded some heap functions