Synthesis and preservation of polymer nanoparticles for pharmaceuticals applications