Chitosan nanoparticles preparation and applications