Synthesis of gold and silver nanoparticles functionalized with organic dithiols