added discharging heap class