add charge and discharge to channel.py