Comparison of two ways using Ag nanoparticles to improve the performance of dye-sensitized solar cells