draft code for heap remove is ready