Investigations on magnetic properties and structure for carbon encapsulated nanoparticles of Fe, Co, Ni