inflict charge function updated