Preparation and properties of ferromagnetic carbon-coated Fe, Co, and Ni nanoparticles