added support for ranges