diff --git a/xos/cord/models.py b/xos/cord/models.py
index ca010cb..44ced17 100644
--- a/xos/cord/models.py
+++ b/xos/cord/models.py
@@ -197,6 +197,9 @@
         proxy = True
 
     def allocate_bbs_account(self):
+        # XXX fixme XXX
+        return "bbs01@onlab.us"
+
         vcpes = VCPETenant.get_tenant_objects().all()
         bbs_accounts = [vcpe.bbs_account for vcpe in vcpes]
 
diff --git a/xos/core/xoslib/methods/cordsubscriber.py b/xos/core/xoslib/methods/cordsubscriber.py
index 5742c9c..5992a2e 100644
--- a/xos/core/xoslib/methods/cordsubscriber.py
+++ b/xos/core/xoslib/methods/cordsubscriber.py
@@ -311,9 +311,24 @@
         subscriber.save()
         return Response({service: getattr(subscriber, service_attr)})
 
+    def setup_demo_vcpe(self, voltTenant):
+        # nuke the users and start over
+        voltTenant.vcpe.users = []
+        voltTenant.vcpe.create_user(name="Mom's PC",      mac="01020303040506", level="PG_13")
+        voltTenant.vcpe.create_user(name="Dad's PC",      mac="01020304040507", level="PG_13")
+        voltTenant.vcpe.create_user(name="Jack's iPhone", mac="01020304050508", level="PG_13")
+        voltTenant.vcpe.create_user(name="Jill's iPad",   mac="01020304050609", level="PG_13")
+        voltTenant.vcpe.save()
+
     def initdemo(self, request):
         object_list = VOLTTenant.get_tenant_objects().all()
 
+        # reset the parental controls in any existing demo vCPEs
+        for o in object_list:
+            if str(o.service_specific_id) in ["0", "1"]:
+                if o.vcpe is not None:
+                    self.setup_demo_vcpe(o)
+
         demo_subscribers = [o for o in object_list if o.is_demo_user]
 
         if demo_subscribers:
@@ -325,25 +340,21 @@
         voltTenant.caller = User.objects.get(email="padmin@vicci.org")
         voltTenant.save()
 
-        voltTenant.vcpe.create_user(name="Mom's PC",      mac="01020303040506", level="R")
-        voltTenant.vcpe.create_user(name="Dad's PC",      mac="01020304040507", level="R")
-        voltTenant.vcpe.create_user(name="Jack's iPhone", mac="01020304050508", level="PG")
-        voltTenant.vcpe.create_user(name="Jill's iPad",   mac="01020304050609", level="G")
-        voltTenant.vcpe.save()
+        self.setup_demo_vcpe(voltTenant)
 
         return Response({"id": voltTenant.id})
 
     def ssidlist(self, request):
         object_list = VOLTTenant.get_tenant_objects().all()
 
-        ssidmap = [ {"service_specific_id:": x.service_specific_id, "subscriber_id": x.id} for x in object_list ]
+        ssidmap = [ {"service_specific_id": x.service_specific_id, "subscriber_id": x.id} for x in object_list ]
 
         return Response({"ssidmap": ssidmap})
 
     def ssiddetail(self, pk=None, ssid=None):
         object_list = VOLTTenant.get_tenant_objects().all()
 
-        ssidmap = [ {"service_specific_id:": x.service_specific_id, "subscriber_id": x.id} for x in object_list if str(x.service_specific_id)==str(ssid) ]
+        ssidmap = [ {"service_specific_id": x.service_specific_id, "subscriber_id": x.id} for x in object_list if str(x.service_specific_id)==str(ssid) ]
 
         if len(ssidmap)==0:
             raise XOSNotFound("didn't find ssid %s" % str(ssid))
diff --git a/xos/core/xoslib/methods/volttenant.py b/xos/core/xoslib/methods/volttenant.py
index a1ae656..ba0e909 100644
--- a/xos/core/xoslib/methods/volttenant.py
+++ b/xos/core/xoslib/methods/volttenant.py
@@ -3,6 +3,7 @@
 from rest_framework.reverse import reverse
 from rest_framework import serializers
 from rest_framework import generics
+from rest_framework import status
 from core.models import *
 from django.forms import widgets
 from cord.models import VOLTTenant, VOLTService
@@ -68,6 +69,21 @@
 
         return queryset
 
+    def post(self, request, format=None):
+        data = request.DATA
+
+        existing_obj = None
+        for obj in VOLTTenant.get_tenant_objects().all():
+            if (obj.vlan_id == data.get("vlan_id", None)) and (obj.service_specific_id == data.get("service_specific_id",None)):
+               existing_obj = obj
+
+        if existing_obj:
+            serializer = VOLTTenantIdSerializer(existing_obj)
+            headers = self.get_success_headers(serializer.data)
+            return Response( serializer.data, status=status.HTTP_200_OK )
+
+        return super(VOLTTenantList, self).post(request, format)
+
 class VOLTTenantDetail(XOSRetrieveUpdateDestroyAPIView):
     serializer_class = VOLTTenantIdSerializer
     queryset = VOLTTenant.get_tenant_objects().select_related().all()
diff --git a/xos/observers/vcpe/broadbandshield.py b/xos/observers/vcpe/broadbandshield.py
index 96f9944..9d08ed8 100644
--- a/xos/observers/vcpe/broadbandshield.py
+++ b/xos/observers/vcpe/broadbandshield.py
@@ -54,7 +54,9 @@
 
 
 class BBS:
-    level_map = {"PG_13": "PG-13",
+    level_map = {"PG_13": "PG13",
+                 "NONE": "OFF",
+                 "ALL": "NONE",
                  None: "NONE"}
 
     def __init__(self, username, password):
@@ -229,6 +231,15 @@
         for device in self.settings["devices"]:
             print "  device", device["name"], "user", device["username"], "rating", device["settings"]["rating"], "mac", device["mac_address"]
 
+def dump():
+    if len(sys.argv)!=3:
+        print "syntax: broadbandshield.py <email> <password>"
+        sys.exit(-1)
+
+    bbs = BBS(sys.argv[1], sys.argv[2])
+
+    bbs.dump()
+
 def self_test():
     if len(sys.argv)!=3:
         print "syntax: broadbandshield.py <email> <password>"
@@ -345,7 +356,8 @@
     #bbs.add_device(name="tom's iphone", mac="010203040506", type="tablet", username="tom")
 
 def main():
-    self_test()
+    dump()
+    #self_test()
 
 if __name__ == "__main__":
     main()
