added an option for ranges