Bring in charger.c thanks mad credit to evervolv