uncommented add charge code