Does the machine have a cord connection to an electric outlet or does it have to be powered by battery? Thanks?