fixed all but heap removal