Improved electrocatalytic activity of carbon materials by nitrogen doping