             return this;
         }
 
-        public function sortOn(names:*, options:* = 0, ...rest):*
-        {
-            var result:* = source.sortOn.apply(null, [names, options].concat(rest));
+        /**
+         * Sorts the items in a stream according to one or more fields in the stream.
+         * @param names A string that identifies a field to be used as the sort value,
+         *              or an array in which the first item represents the primary sort field,
+         *              the second represents the secondary sort field, and so on.
+         * @param options One or more numbers or names of defined constants, separated
+         *                by the bitwise OR (|) operator, that change the sorting behavior.
+         * @return The return value depends on whether you pass any parameters.
+         * @see com.kemsky.Stream#CASEINSENSITIVE
+         * @see com.kemsky.Stream#NUMERIC
+         * @see com.kemsky.Stream#DESCENDING
+         * @see com.kemsky.Stream#RETURNINDEXEDARRAY
+         * @see com.kemsky.Stream#UNIQUESORT
+         */
+        public function sortOn(names:Object, options:Object = null):*
+        {
+            var result:* = source.sortOn.apply(null, [names, options]);
 
             if(result == 0)
             {

            return slice(offset, offset + count);
        }

        public function flatten():Stream
        {
            return flatMap(null);
        }

        public function flatMap(callback:Function):Stream
        {
            var f:Function = function (item:*):*

            return new Stream(source.concat().reverse());
        }

        /**
         * Concatenates the elements specified in the parameters with the
         * elements in a stream and creates a new stream. If the parameters
         * specify an stream, the elements of that array are concatenated.
         * If you don't pass any parameters, the new stream is a duplicate
         * (shallow clone) of the original stream.
         * @param rest A value of any data type (such as numbers, elements, or strings) to be concatenated in a new stream.
         * @return  A new stream that contains the items from this stream followed by items from the parameters.
         */
        public function concat(...rest):Stream
        {
            var result:Array = source.concat();
