Electric vehicles in smart grid