js set rate