Electrochemical reduction of amides and c=c bonds