Alternator function and repair