diff --git a/asterix-app/src/main/resources/sdk/static/example/js/demo.js b/asterix-app/src/main/resources/sdk/static/example/js/demo.js
index 25aedf9..7298024 100644
--- a/asterix-app/src/main/resources/sdk/static/example/js/demo.js
+++ b/asterix-app/src/main/resources/sdk/static/example/js/demo.js
@@ -154,17 +154,15 @@
         $('#result8').html('');   
         var expression8 = new FunctionExpression({
             "function"      : "count",
-            "expression"    : new ForClause(
-                                "fbu", null, new AsterixExpression().set(["dataset FacebookUsers"])
-                              ).bind(
-                                {"return" : new AsterixExpression().set(["$fbu"])}
-                              ),
+            "expression"    : new ForClause("fbu", null, new AExpression().set("dataset FacebookUsers"))
+                                    .bind( new ReturnClause( new AExpression().set("$fbu") )),
             "dataverse"     : "TinySocial",
             "success"       : function(res) {
                                 $('#result8').html(res["results"]);
                               }
         });
-        expression8.run();
+        alert(expression8.val());
+        // expression8.run();
     });
 
     // 9a - Grouping & Aggregation
@@ -262,14 +260,36 @@
         var expression11 = new FLWOGRExpression({
             "dataverse" : "TinySocial",
             "success"   : function(res) {
-                            alert(JSON.stringify(res));
                             $('#result11').html(res["results"]);
                           }
-        });
-        alert("EXPRESSION 11 " + expression11.val());
+        })
+        .bind( new SetStatement( "simfunction", "jaccard" ))
+        .bind( new SetStatement( "simthreshold", "0.3"))
+        .bind( new ForClause( "t", null, new AsterixExpression().set(["dataset TweetMessages"]) ))
+        .bind( new ReturnClause({
+            "tweet"         : new AExpression().set("$t"),       
+            "similar-tweets": new FLWOGRExpression()
+                                .bind( new ForClause( "t2", null, new AExpression().set("dataset TweetMessages") ))
+                                .bind( new AQLClause().set("where $t2.referred-topics ~= $t.referred-topics and $t2.tweetid != $t.tweetid") )
+                                .bind( new ReturnClause(new AQLClause().set("$t2.referred-topics")))
+        })); 
+        
+        expression11.run();
     });
 
+    //$('#run0a').trigger('click');
+    //$('#run0b').trigger('click');
+    //$('#run1').trigger('click');
+    //$('#run2a').trigger('click');
+    //$('#run2b').trigger('click');
+    //$('#run3').trigger('click');
+    //$('#run4').trigger('click');
+    //$('#run5').trigger('click');
+    //$('#run6').trigger('click');
+    //$('#run7').trigger('click');
+    //$('#run8').trigger('click');
     $('#run9a').trigger('click');
     $('#run9b').trigger('click');
     $('#run10').trigger('click');
+    $('#run11').trigger('click');
 });
diff --git a/asterix-app/src/main/resources/sdk/static/js/asterix-sdk-stable.js b/asterix-app/src/main/resources/sdk/static/js/asterix-sdk-stable.js
index 870f93b..5854521 100644
--- a/asterix-app/src/main/resources/sdk/static/js/asterix-sdk-stable.js
+++ b/asterix-app/src/main/resources/sdk/static/js/asterix-sdk-stable.js
@@ -301,6 +301,7 @@
     AExpression.call(this);
 
     this._properties["clauses"] = [];
+    this._properties["minSize"] = 0;
 
     // Bind options and return
     this.bind(options);
@@ -317,7 +318,12 @@
 
     var options = options || {};
 
-    if (this._properties["clauses"].length == 0) {
+    if (options instanceof SetStatement) {
+         this._properties["clauses"].push(options);
+         this._properties["minSize"] += 1;
+    }
+
+    if (this._properties["clauses"].length <= this._properties["minSize"]) {
         // Needs to start with for or let clause
         if (options instanceof ForClause || options instanceof LetClause) {
             this._properties["clauses"].push(options);
@@ -340,7 +346,7 @@
         clauseValues.push(this._properties["clauses"][c].val());
     }
 
-    return value + clauseValues.join("\n") + ";";
+    return value + clauseValues.join("\n");// + ";";
 };
 
 
@@ -437,7 +443,7 @@
     AQLClause.call(this);
 
     this._properties["clause"] = "return ";
-    if (expression instanceof AExpression) {
+    if (expression instanceof AExpression || expression instanceof AQLClause) {
         this._properties["clause"] += expression.val();
     } else if ( Object.getPrototypeOf( expression ) === Object.prototype ) {
         
@@ -661,3 +667,21 @@
 BooleanExpression.prototype.val = function() {
     return this.value;
 }
+
+
+// SetStatement
+//
+// Grammar
+// "set" Identifier StringLiteral
+function SetStatement (identifier, stringLiteral) {
+    AExpression.call(this);
+
+    var statement = "set " + identifier + ' "' + stringLiteral + '";';
+
+    AExpression.prototype.set.call(this, statement);
+
+    return this;
+}
+
+SetStatement.prototype = Object.create(AExpression.prototype);
+SetStatement.prototype.constructor = SetStatement;
