Added heap implementation