working on heap tree