unit test debugging
fix chargerange function