Carbon dioxide reduction by heterogeneous and homogeneous electrocatalysts