Changed charge function