add charge logic