refactoring, now we able to split request into subqueries and join results (with sorting, limits, etc)