Update to use the range instead of pi