use heap, not sort