min-max works, 5-heap works