implement min heap erase function