wrote basic heap implementation