A cost of ownership analysis of batteries in all-electric and plug-in hybrid vehicles