improve the speed of reduced rs method(2 times faster).