update heap