charge cycle refactored