add switch to auto get rate