complex queries module redesigned to moved methods