Added keyvalue functionality for ranges