optimized code based on other people's ranges