 			_where = where;
 			_orderby = orderby;
 			_groupby = groupby;
-			_sorter = sorter();
+			_sort = sorter();
 			_aggrs = aggregates();
 		}
 		
-		private function sorter():Function
+		private function sorter():Sort
 		{
 			var s:Array = [], i:int;
 			if (_groupby != null) {

				});
			}
			// sort the result set
			if (_sorter != null) {
				Sort.sort(results, _sorter);
			}
			
			if (_select == null) return results;

				for (i=0; i<_orderby.length; ++i)
					s.push(_orderby[i]);
			}
			return s.length==0 ? null : new Sort(s);
		}
		
		private function aggregates():Array
