Adding heap implementation