diff --git a/asterix-examples/src/main/resources/cherry/js/asterix-api-core.js b/asterix-examples/src/main/resources/cherry/js/asterix-api-core.js
index e5d64eb..9553997 100755
--- a/asterix-examples/src/main/resources/cherry/js/asterix-api-core.js
+++ b/asterix-examples/src/main/resources/cherry/js/asterix-api-core.js
@@ -460,32 +460,3 @@
 AsterixCoreAPI.prototype.api_helper_default_on_error = function (error_code, error_message) {
     alert("ERROR " + error_code + ": " + error_message);       
 }
-
-/**
-* API Helper - Spatial/Polygon Creator
-* 
-* @param    {Object}    bounds, {"ne" => { "lat", "lng" }, "sw" => {"lat", "lng"} }
-* @returns  {String}    query string form of a polygon
-*
-* TODO this is kind of hacky :/
-*/
-AsterixCoreAPI.prototype.rectangle = function(bounds) {
-   var lower_left = 'create-point(' + bounds["sw"]["lat"] + ',' + bounds["sw"]["lng"] + ')';
-   var upper_right = 'create-point(' + bounds["ne"]["lat"] + ',' + bounds["ne"]["lng"] + ')';
-
-   var rectangle_statement = 'create-rectangle(' + lower_left + ', ' + upper_right + ')';
-   this.parameters["statements"].push(rectangle_statement);
-    
-   return this;
-}
-
-AsterixCoreAPI.prototype.api_helper_polygon_to_statement = function(bounds) {
-    var polygon = [];
-    polygon.push([bounds["ne"]["lat"] + "," + bounds["sw"]["lng"]]);
-    polygon.push([bounds["sw"]["lat"] + "," + bounds["sw"]["lng"]]);
-    polygon.push([bounds["sw"]["lat"] + "," + bounds["ne"]["lng"]]);
-    polygon.push([bounds["ne"]["lat"] + "," + bounds["ne"]["lng"]]);
-    
-    var polygon_statement = 'polygon("' + polygon.join(" ") + '")';
-    return polygon_statement;
-}
diff --git a/asterix-examples/src/main/resources/cherry/js/cherry.js b/asterix-examples/src/main/resources/cherry/js/cherry.js
index 3eccda9..2044668 100755
--- a/asterix-examples/src/main/resources/cherry/js/cherry.js
+++ b/asterix-examples/src/main/resources/cherry/js/cherry.js
@@ -222,7 +222,11 @@
         formData["swLng"] = Math.abs(bounds.getSouthWest().lng());
         formData["neLat"] = Math.abs(bounds.getNorthEast().lat());
         formData["neLng"] = Math.abs(bounds.getNorthEast().lng());
-		
+		var formBounds = {
+            "ne" : { "lat" : formData["neLat"], "lng" : formData["neLng"]}, 
+		    "sw" : { "lat" : formData["swLat"], "lng" : formData["swLng"]}
+        };
+
 		var build_cherry_mode = "synchronous";
 		if ($('#asbox').is(":checked")) {
 		    build_cherry_mode = "asynchronous";
@@ -232,23 +236,18 @@
 		// It can also be used to generate queries, which can
 		// then be passed into another API call or stored 
 		// for a different application purpose. 
-		                        .rectangle({
-		                            "ne" : { "lat" : formData["neLat"], "lng" : formData["neLng"]}, 
-		                            "sw" : { "lat" : formData["swLat"], "lng" : formData["swLng"]}
-                                }) 
-		    
         var l = new LegacyExpression()
             .dataverse("twitter")
 		    .bind(new ForClause("t", new AsterixClause().set("TweetMessages")))
             .bind(new LetClause("keyword", new AsterixClause().set('"' + formData["keyword"] + '"')))
-            .bind(new LetClause("region", new ????))// TODO
-            .bind(new WhereClause("where " + [ // TODO
+            .bind(new LetClause("region", new AsterixSDK().rectangle(formBounds)))
+            .bind(new WhereClause("where " + [
 		        'spatial-intersect($t.sender-location, $region)',
 		        '$t.send-time > datetime("' + formData["startdt"] + '")',
 		        '$t.send-time < datetime("' + formData["enddt"] + '")',
 		        'contains($t.message-text, $keyword)'
              ]).join(" "))
-            .bind(new GroupClause().set("group by $c := spatial-cell($t.sender-location, create-point(24.5,-125.5), " + formData["gridlat"].toFixed(1) + ", " + formData["gridlng"].toFixed(1) + ")")) // TODO
+            .bind(new GroupClause().set("group by $c := spatial-cell($t.sender-location, create-point(24.5,-125.5), " + formData["gridlat"].toFixed(1) + ", " + formData["gridlng"].toFixed(1) + ")"))
 		    .return({ "cell" : "$c", "count" : "count($t)" })
             .success(cherryQuerySyncCallback, true)
 		    .success(cherryQueryAsyncCallback, false)
