Deal with ranges input to save queries
Merge pull request #214 from smirfolio/master

Deal with ranges input to save queries