Modify query.py to get range of values from sMAP