add SetRates function and related fix
Merge pull request #4 from sijchen/plugin2_SetRates11

add SetRates function and related fix