diff --git a/planetstack/core/xoslib/__init__.py b/planetstack/core/xoslib/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/planetstack/core/xoslib/__init__.py
@@ -0,0 +1 @@
+
diff --git a/planetstack/core/xoslib/methods/__init__.py b/planetstack/core/xoslib/methods/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/planetstack/core/xoslib/methods/__init__.py
@@ -0,0 +1 @@
+
diff --git a/planetstack/core/xoslib/methods/sliceplus.py b/planetstack/core/xoslib/methods/sliceplus.py
new file mode 100644
index 0000000..79aae3b
--- /dev/null
+++ b/planetstack/core/xoslib/methods/sliceplus.py
@@ -0,0 +1,59 @@
+from rest_framework.decorators import api_view
+from rest_framework.response import Response
+from rest_framework.reverse import reverse
+from rest_framework import serializers
+from rest_framework import generics
+from core.models import *
+from django.forms import widgets
+from core.xoslib.objects.sliceplus import SlicePlus
+
+class SlicePlusIdSerializer(serializers.ModelSerializer):
+        id = serializers.Field()
+
+        sliceInfo = serializers.SerializerMethodField("getSliceInfo")
+
+        def getSliceInfo(self, slice):
+            return slice.getSliceInfo()
+
+        networks = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='network-detail')
+        availableNetworks = serializers.HyperlinkedRelatedField(many=True, read_only=True, view_name='network-detail')
+
+        class Meta:
+            model = SlicePlus
+            fields = ('id','created','updated','enacted','name','enabled','omf_friendly','description','slice_url','site','max_slivers','imagePreference','service','network','mountDataSets','serviceClass','creator','networks','availableNetworks','sliceInfo')
+
+class SlicePlusList(generics.ListCreateAPIView):
+    queryset = SlicePlus.objects.select_related().all()
+    serializer_class = SlicePlusIdSerializer
+
+    def get_queryset(self):
+        return SlicePlus.select_by_user(self.request.user)
+
+    def create(self, request, *args, **kwargs):
+        obj = self.get_object()
+        obj.caller = request.user
+        if obj.can_update(request.user):
+            return super(SliceList, self).create(request, *args, **kwargs)
+        else:
+            return Response(status=status.HTTP_400_BAD_REQUEST)
+
+class SlicePlusDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = SlicePlus.objects.select_related().all()
+    serializer_class = SlicePlusIdSerializer
+
+    def get_queryset(self):
+        return SlicePlus.select_by_user(self.request.user)
+
+    def update(self, request, *args, **kwargs):
+        obj = self.get_object()
+        if obj.can_update(request.user):
+            return super(SlicePlusDetail, self).update(request, *args, **kwargs)
+        else:
+            return Response(status=status.HTTP_400_BAD_REQUEST)
+
+    def destroy(self, request, *args, **kwargs):
+        obj = self.get_object()
+        if obj.can_update(request.user):
+            return super(SlicePlusDetail, self).destroy(request, *args, **kwargs)
+        else:
+            return Response(status=status.HTTP_400_BAD_REQUEST)
diff --git a/planetstack/core/xoslib/objects/__init__.py b/planetstack/core/xoslib/objects/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/planetstack/core/xoslib/objects/__init__.py
@@ -0,0 +1 @@
+
diff --git a/planetstack/core/xoslib/objects/sliceplus.py b/planetstack/core/xoslib/objects/sliceplus.py
index a68602d..e35f4d1 100644
--- a/planetstack/core/xoslib/objects/sliceplus.py
+++ b/planetstack/core/xoslib/objects/sliceplus.py
@@ -1,15 +1,19 @@
 from core.models.slice import Slice
 
 class SlicePlus(Slice):
+    class Meta:
+        proxy = True
+
     def getSliceInfo(self, user=None):
-        used_sites = []
-        used_deployments = []
+        used_sites = {}
+        used_deployments = {}
         sliverCount = 0
         for sliver in self.slivers.all():
             site = sliver.node.site
             deployment = sliver.node.deployment
-            used_sites[site.name] = used.sites.get(site.name, 0) + 1
+            used_sites[site.name] = used_sites.get(site.name, 0) + 1
             used_deployments[deployment.name] = used_deployments.get(deployment.name, 0) + 1
+            sliverCount = sliverCount + 1
 
         roles = []
         if (user!=None):
@@ -17,6 +21,18 @@
 
         return {"sitesUsed": used_sites,
                 "deploymentsUsed": used_deployments,
-                "sliverCount": sliceCount,
+                "sliverCount": sliverCount,
                 "siteCount": len(used_sites.keys()),
                 "roles": roles}
+
+    @staticmethod
+    def select_by_user(user):
+        print "XX"
+        if user.is_admin:
+            qs = SlicePlus.objects.all()
+        else:
+            slice_ids = [sp.slice.id for sp in SlicePrivilege.objects.filter(user=user)]
+            qs = SlicePlus.objects.filter(id__in=slice_ids)
+        print qs
+        print qs.all()
+        return qs
