Mechanical energy is converted to electrical energy by......