added some heap functions