Added heap method for chunk merge