refactored functions in query some more to allow re-use in range_range, select() pretty much just calls out to a bunch of handlers now