diff --git a/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedRole.java b/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedRole.java
index 0c79d6d..29dd9d4 100644
--- a/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedRole.java
+++ b/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedRole.java
@@ -1,15 +1,22 @@
 package de.ids_mannheim.korap.constant;
 
 public enum PredefinedRole {
-    GROUP_ADMIN(1), GROUP_MEMBER(2), VC_ADMIN(3), VC_MEMBER(3);
+    GROUP_ADMIN(1), GROUP_MEMBER(2), VC_ADMIN(3), VC_MEMBER(4);
     
     private int id;
+    private String name;
 
     PredefinedRole (int i) {
         this.id = i;
+        this.name = name().toLowerCase().replace("_", " "); 
     }
     
     public int getId () {
         return id;
     }
+    
+    @Override
+    public String toString () {
+        return this.name;
+    }
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/RoleDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/RoleDao.java
index ac73e26..fdf1c46 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/RoleDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/RoleDao.java
@@ -1,12 +1,15 @@
 package de.ids_mannheim.korap.dao;
 
 import java.util.List;
+import java.util.Set;
 
 import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
 import javax.persistence.Query;
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.ListJoin;
+import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,6 +20,8 @@
 import de.ids_mannheim.korap.entity.Privilege;
 import de.ids_mannheim.korap.entity.Role;
 import de.ids_mannheim.korap.entity.Role_;
+import de.ids_mannheim.korap.entity.UserGroupMember;
+import de.ids_mannheim.korap.entity.UserGroupMember_;
 
 @Transactional
 @Repository
@@ -40,12 +45,12 @@
         entityManager.remove(r);
     }
 
-    public void updateRoleName (int roleId, String name) {
+    public void editRoleName (int roleId, String name) {
         Role r = retrieveRoleById(roleId);
         r.setName(name);
         entityManager.persist(r);
     }
-    
+
     public Role retrieveRoleById (int roleId) {
         CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
         CriteriaQuery<Role> query = criteriaBuilder.createQuery(Role.class);
@@ -70,4 +75,19 @@
         return (Role) q.getSingleResult();
     }
 
+    public List<Role> retrieveRoleByGroupMemberId (int userId) {
+        CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
+        CriteriaQuery<Role> query = criteriaBuilder.createQuery(Role.class);
+
+        Root<Role> root = query.from(Role.class);
+        ListJoin<Role, UserGroupMember> memberRole =
+                root.join(Role_.userGroupMembers);
+
+        query.select(root);
+        query.where(criteriaBuilder.equal(memberRole.get(UserGroupMember_.id),
+                userId));
+        Query q = entityManager.createQuery(query);
+        return q.getResultList();
+    }
+
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java
index f96cbd5..915a1ce 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java
@@ -1,14 +1,17 @@
 package de.ids_mannheim.korap.dao;
 
-import java.util.HashSet;
+import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
-import java.util.Set;
 
 import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
 import javax.persistence.PersistenceContext;
 import javax.persistence.Query;
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Expression;
+import javax.persistence.criteria.Join;
 import javax.persistence.criteria.ListJoin;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
@@ -27,7 +30,12 @@
 import de.ids_mannheim.korap.entity.UserGroupMember_;
 import de.ids_mannheim.korap.entity.UserGroup_;
 import de.ids_mannheim.korap.entity.VirtualCorpus;
-import de.ids_mannheim.korap.entity.VirtualCorpusAccessGroup;
+import de.ids_mannheim.korap.entity.VirtualCorpusAccess;
+import de.ids_mannheim.korap.entity.VirtualCorpusAccess_;
+import de.ids_mannheim.korap.entity.VirtualCorpus_;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.exceptions.StatusCodes;
+import de.ids_mannheim.korap.utils.ParameterChecker;
 
 @Transactional
 @Repository
@@ -41,28 +49,38 @@
     @Autowired
     private RoleDao roleDao;
 
-    public void createGroup (String name, String createdBy,
-            UserGroupStatus status) {
+    public int createGroup (String name, String createdBy,
+            UserGroupStatus status) throws KustvaktException {
+        ParameterChecker.checkStringValue(name, "name");
+        ParameterChecker.checkStringValue(createdBy, "createdBy");
+        ParameterChecker.checkObjectValue(status, "UserGroupStatus");
+
         UserGroup group = new UserGroup();
         group.setName(name);
         group.setStatus(status);
         group.setCreatedBy(createdBy);
         entityManager.persist(group);
 
-        Set<Role> roles = new HashSet<Role>(2);
+        List<Role> roles = new ArrayList<Role>(2);
         roles.add(roleDao.retrieveRoleById(PredefinedRole.GROUP_ADMIN.getId()));
         roles.add(roleDao.retrieveRoleById(PredefinedRole.VC_ADMIN.getId()));
 
         UserGroupMember owner = new UserGroupMember();
+        owner.setUserId(createdBy);
         owner.setCreatedBy(createdBy);
         owner.setStatus(GroupMemberStatus.ACTIVE);
         owner.setGroup(group);
         owner.setRoles(roles);
         entityManager.persist(owner);
+
+        return group.getId();
     }
 
     public void deleteGroup (int groupId, String deletedBy,
-            boolean isSoftDelete) {
+            boolean isSoftDelete) throws KustvaktException {
+        ParameterChecker.checkIntegerValue(groupId, "groupId");
+        ParameterChecker.checkStringValue(deletedBy, "deletedBy");
+
         UserGroup group = retrieveGroupById(groupId);
         if (isSoftDelete) {
             group.setStatus(UserGroupStatus.DELETED);
@@ -74,7 +92,25 @@
         }
     }
 
-    public UserGroup retrieveGroupById (int groupId) {
+    public void editGroupName (int groupId, String name)
+            throws KustvaktException {
+        UserGroup group = retrieveGroupById(groupId);
+        group.setName(name);
+        entityManager.persist(group);
+    }
+
+    /** Retrieves the UserGroup by the given group id. This methods does not 
+     *  fetch group members because only group admin is allowed to see them. 
+     *  Group members have to be retrieved separately.
+     * 
+     * @see UserGroupMember
+     * @param groupId group id
+     * @return UserGroup
+     * @throws KustvaktException 
+     */
+    public UserGroup retrieveGroupById (int groupId) throws KustvaktException {
+        ParameterChecker.checkIntegerValue(groupId, "groupId");
+
         CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
         CriteriaQuery<UserGroup> query =
                 criteriaBuilder.createQuery(UserGroup.class);
@@ -83,26 +119,69 @@
         query.select(root);
         query.where(criteriaBuilder.equal(root.get(UserGroup_.id), groupId));
         Query q = entityManager.createQuery(query);
-        return (UserGroup) q.getSingleResult();
+
+        UserGroup userGroup;
+        try {
+            userGroup = (UserGroup) q.getSingleResult();
+        }
+        catch (NoResultException e) {
+            throw new KustvaktException(StatusCodes.NO_RESULT_FOUND,
+                    "No result found for query: retrieve group by id "
+                            + groupId,
+                    String.valueOf(groupId), e);
+        }
+        return userGroup;
     }
 
-    public List<UserGroup> retrieveGroupByUserId (String userId) {
+    public UserGroup retrieveGroupWithMemberById (int groupId)
+            throws KustvaktException {
+
+        ParameterChecker.checkIntegerValue(groupId, "groupId");
+
+        CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
+        CriteriaQuery<UserGroup> query =
+                criteriaBuilder.createQuery(UserGroup.class);
+
+        Root<UserGroup> root = query.from(UserGroup.class);
+        root.fetch(UserGroup_.members);
+        query.select(root);
+        query.where(criteriaBuilder.equal(root.get(UserGroup_.id), groupId));
+        Query q = entityManager.createQuery(query);
+
+        UserGroup userGroup;
+        try {
+            userGroup = (UserGroup) q.getSingleResult();
+        }
+        catch (NoResultException e) {
+            throw new KustvaktException(StatusCodes.NO_RESULT_FOUND,
+                    "No result found for query: retrieve group by id "
+                            + groupId,
+                    String.valueOf(groupId), e);
+        }
+        return userGroup;
+    }
+
+    /** Retrieves only user-groups that are active (not hidden or deleted).
+     * 
+     * @param userId user id
+     * @return a list of UserGroup
+     * @throws KustvaktException
+     */
+    public List<UserGroup> retrieveGroupByUserId (String userId)
+            throws KustvaktException {
+        ParameterChecker.checkStringValue(userId, "userId");
+
         CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
         CriteriaQuery<UserGroup> query =
                 criteriaBuilder.createQuery(UserGroup.class);
 
         Root<UserGroup> root = query.from(UserGroup.class);
 
-        Predicate allUserGroup = criteriaBuilder.and(
-                criteriaBuilder.equal(root.get(UserGroup_.name),
-                        USER_GROUP_ALL),
-                criteriaBuilder.notEqual(root.get(UserGroup_.status),
-                        UserGroupStatus.DELETED));
-
-
         ListJoin<UserGroup, UserGroupMember> members =
                 root.join(UserGroup_.members);
-        Predicate memberships = criteriaBuilder.and(
+        Predicate restrictions = criteriaBuilder.and(
+                criteriaBuilder.equal(root.get(UserGroup_.status),
+                        UserGroupStatus.ACTIVE),
                 criteriaBuilder.equal(members.get(UserGroupMember_.userId),
                         userId),
                 criteriaBuilder.equal(members.get(UserGroupMember_.status),
@@ -110,14 +189,14 @@
 
 
         query.select(root);
-        query.where(criteriaBuilder.and(allUserGroup, memberships));
+        query.where(restrictions);
         Query q = entityManager.createQuery(query);
         return q.getResultList();
     }
 
     public void addVCToGroup (VirtualCorpus virtualCorpus, String createdBy,
             VirtualCorpusAccessStatus status, UserGroup group) {
-        VirtualCorpusAccessGroup accessGroup = new VirtualCorpusAccessGroup();
+        VirtualCorpusAccess accessGroup = new VirtualCorpusAccess();
         accessGroup.setCreatedBy(createdBy);
         accessGroup.setStatus(status);
         accessGroup.setUserGroup(group);
@@ -134,4 +213,26 @@
         }
     }
 
+    public void deleteVCFromGroup (int virtualCorpusId, int groupId) throws KustvaktException {
+        ParameterChecker.checkIntegerValue(virtualCorpusId, "virtualCorpusId");
+        ParameterChecker.checkIntegerValue(groupId, "groupId");
+
+        CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
+        CriteriaQuery<VirtualCorpusAccess> query =
+                criteriaBuilder.createQuery(VirtualCorpusAccess.class);
+
+        Root<VirtualCorpusAccess> root = query.from(VirtualCorpusAccess.class);
+        Join<VirtualCorpusAccess, VirtualCorpus> vc = root.join(VirtualCorpusAccess_.virtualCorpus);
+        Join<VirtualCorpusAccess, UserGroup> group = root.join(VirtualCorpusAccess_.userGroup);
+
+        Predicate virtualCorpus = criteriaBuilder.equal(vc.get(VirtualCorpus_.id), virtualCorpusId);
+        Predicate userGroup = criteriaBuilder.equal(group.get(UserGroup_.id), groupId);
+        
+        query.select(root);
+        query.where(criteriaBuilder.and(virtualCorpus, userGroup));
+        Query q = entityManager.createQuery(query);
+        VirtualCorpusAccess vcAccess = (VirtualCorpusAccess) q.getSingleResult();
+        entityManager.remove(vcAccess);
+    }
+
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupMemberDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupMemberDao.java
index f0789ac..1a80b92 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupMemberDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupMemberDao.java
@@ -23,26 +23,25 @@
 
 @Transactional
 @Repository
-public class UserGroupMemberDao<X> {
+public class UserGroupMemberDao {
 
     @PersistenceContext
     private EntityManager entityManager;
 
-    public void addMember (UserGroupMember member)
-            throws KustvaktException {
+    public void addMember (UserGroupMember member) throws KustvaktException {
         ParameterChecker.checkObjectValue(member, "userGroupMember");
         entityManager.persist(member);
     }
-    
+
     public void addMembers (List<UserGroupMember> members)
             throws KustvaktException {
         ParameterChecker.checkObjectValue(members, "List<UserGroupMember>");
 
-        for (UserGroupMember member: members){
+        for (UserGroupMember member : members) {
             addMember(member);
         }
     }
-    
+
     public void approveMember (String userId, int groupId)
             throws KustvaktException {
         ParameterChecker.checkStringValue(userId, "userId");
@@ -80,8 +79,10 @@
         Root<UserGroupMember> root = query.from(UserGroupMember.class);
 
         Predicate predicate = criteriaBuilder.and(
-                criteriaBuilder.equal(root.get(UserGroupMember_.group), groupId),
-                criteriaBuilder.equal(root.get(UserGroupMember_.userId), userId));
+                criteriaBuilder.equal(root.get(UserGroupMember_.group),
+                        groupId),
+                criteriaBuilder.equal(root.get(UserGroupMember_.userId),
+                        userId));
 
         query.select(root);
         query.where(predicate);
@@ -89,16 +90,18 @@
         return (UserGroupMember) q.getSingleResult();
     }
 
-    public List<UserGroupMember> retrieveMemberByRole (int groupId, int roleId) {
+    public List<UserGroupMember> retrieveMemberByRole (int groupId,
+            int roleId) {
         CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
         CriteriaQuery<UserGroupMember> query =
                 criteriaBuilder.createQuery(UserGroupMember.class);
 
         Root<UserGroupMember> root = query.from(UserGroupMember.class);
         Join<UserGroupMember, Role> memberRole = root.join("roles");
-        
+
         Predicate predicate = criteriaBuilder.and(
-                criteriaBuilder.equal(root.get(UserGroupMember_.group), groupId),
+                criteriaBuilder.equal(root.get(UserGroupMember_.group),
+                        groupId),
                 criteriaBuilder.equal(memberRole.get("role_id"), roleId));
 
         query.select(root);
@@ -106,4 +109,20 @@
         Query q = entityManager.createQuery(query);
         return q.getResultList();
     }
+
+    public List<UserGroupMember> retrieveMemberByGroupId (int groupId) {
+        CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
+        CriteriaQuery<UserGroupMember> query =
+                criteriaBuilder.createQuery(UserGroupMember.class);
+
+        Root<UserGroupMember> root = query.from(UserGroupMember.class);
+
+        Predicate predicate = criteriaBuilder.and(criteriaBuilder
+                .equal(root.get(UserGroupMember_.group), groupId));
+
+        query.select(root);
+        query.where(predicate);
+        Query q = entityManager.createQuery(query);
+        return q.getResultList();
+    }
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusDao.java
index 266a788..a57ae75 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusDao.java
@@ -11,6 +11,7 @@
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Join;
+import javax.persistence.criteria.ListJoin;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 
@@ -22,10 +23,17 @@
 import de.ids_mannheim.korap.constant.VirtualCorpusAccessStatus;
 import de.ids_mannheim.korap.constant.VirtualCorpusType;
 import de.ids_mannheim.korap.entity.UserGroup;
+import de.ids_mannheim.korap.entity.UserGroupMember;
+import de.ids_mannheim.korap.entity.UserGroupMember_;
+import de.ids_mannheim.korap.entity.UserGroup_;
 import de.ids_mannheim.korap.entity.VirtualCorpus;
-import de.ids_mannheim.korap.entity.VirtualCorpusAccessGroup;
+import de.ids_mannheim.korap.entity.VirtualCorpusAccess;
+import de.ids_mannheim.korap.entity.VirtualCorpusAccess_;
+import de.ids_mannheim.korap.entity.VirtualCorpus_;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
+import de.ids_mannheim.korap.user.User.CorpusAccess;
+import de.ids_mannheim.korap.utils.ParameterChecker;
 
 /** VirtualCorpusDao manages SQL queries regarding virtual corpora, 
  *  e.g. retrieving and storing virtual corpora.
@@ -40,8 +48,22 @@
     @PersistenceContext
     private EntityManager entityManager;
 
-    public void storeVirtualCorpus (VirtualCorpus virtualCorpus) {
-        entityManager.persist(virtualCorpus);
+    public int createVirtualCorpus (String name, VirtualCorpusType type,
+            CorpusAccess requiredAccess, String collectionQuery, String definition,
+            String description, String status, String createdBy) {
+
+        VirtualCorpus vc = new VirtualCorpus();
+        vc.setName(name);
+        vc.setType(type);
+        vc.setRequiredAccess(requiredAccess);
+        vc.setCollectionQuery(collectionQuery);
+        vc.setDefinition(definition);
+        vc.setDescription(description);
+        vc.setStatus(status);
+        vc.setCreatedBy(createdBy);
+        
+        entityManager.persist(vc);
+        return vc.getId();
     }
 
     public void deleteVirtualCorpus (int id) throws KustvaktException {
@@ -51,32 +73,30 @@
 
     public List<VirtualCorpus> retrieveVCByType (VirtualCorpusType type)
             throws KustvaktException {
-        if (type == null) {
-            throw new KustvaktException(StatusCodes.MISSING_ARGUMENT, "type",
-                    "null");
-        }
+        ParameterChecker.checkObjectValue(type, "type");
+
         CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
         CriteriaQuery<VirtualCorpus> query =
                 criteriaBuilder.createQuery(VirtualCorpus.class);
         Root<VirtualCorpus> virtualCorpus = query.from(VirtualCorpus.class);
         query.select(virtualCorpus);
-        query.where(criteriaBuilder.equal(virtualCorpus.get("type"), type));
+        query.where(criteriaBuilder
+                .equal(virtualCorpus.get(VirtualCorpus_.type), type));
         Query q = entityManager.createQuery(query);
         return q.getResultList();
     }
 
 
     public VirtualCorpus retrieveVCById (int id) throws KustvaktException {
-        if (id == 0) {
-            throw new KustvaktException(StatusCodes.MISSING_ARGUMENT, "id",
-                    String.valueOf(id));
-        }
+        ParameterChecker.checkIntegerValue(id, "id");
+
         CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
         CriteriaQuery<VirtualCorpus> query =
                 criteriaBuilder.createQuery(VirtualCorpus.class);
         Root<VirtualCorpus> virtualCorpus = query.from(VirtualCorpus.class);
         query.select(virtualCorpus);
-        query.where(criteriaBuilder.equal(virtualCorpus.get("id"), id));
+        query.where(criteriaBuilder.equal(virtualCorpus.get(VirtualCorpus_.id),
+                id));
 
         VirtualCorpus vc = null;
         try {
@@ -95,17 +115,16 @@
 
     public List<VirtualCorpus> retrievePrivateVC (String userId)
             throws KustvaktException {
-        if (userId == null || userId.isEmpty()) {
-            throw new KustvaktException(StatusCodes.MISSING_ARGUMENT, "userId",
-                    userId);
-        }
+        ParameterChecker.checkStringValue(userId, "userId");
+
         CriteriaBuilder builder = entityManager.getCriteriaBuilder();
         CriteriaQuery<VirtualCorpus> query =
                 builder.createQuery(VirtualCorpus.class);
 
         Root<VirtualCorpus> virtualCorpus = query.from(VirtualCorpus.class);
         query.select(virtualCorpus);
-        query.where(builder.equal(virtualCorpus.get("createdBy"), userId));
+        query.where(builder.equal(virtualCorpus.get(VirtualCorpus_.createdBy),
+                userId));
 
         Query q = entityManager.createQuery(query);
         return q.getResultList();
@@ -114,35 +133,33 @@
 
     public List<VirtualCorpus> retrieveGroupVCByUser (String userId)
             throws KustvaktException {
-        if (userId == null || userId.isEmpty()) {
-            throw new KustvaktException(StatusCodes.MISSING_ARGUMENT, "userId",
-                    userId);
-        }
+        ParameterChecker.checkStringValue(userId, "userId");
 
         CriteriaBuilder builder = entityManager.getCriteriaBuilder();
         CriteriaQuery<VirtualCorpus> query =
                 builder.createQuery(VirtualCorpus.class);
 
         Root<VirtualCorpus> virtualCorpus = query.from(VirtualCorpus.class);
-        Join<VirtualCorpus, VirtualCorpusAccessGroup> accessGroup =
-                virtualCorpus.join("accessGroup");
+        Join<VirtualCorpus, VirtualCorpusAccess> access =
+                virtualCorpus.join(VirtualCorpus_.virtualCorpusAccess);
 
         Predicate corpusStatus = builder.and(
-                builder.notEqual(accessGroup.get("status"),
+                builder.notEqual(access.get(VirtualCorpusAccess_.status),
                         VirtualCorpusAccessStatus.HIDDEN),
-                builder.notEqual(accessGroup.get("status"),
+                builder.notEqual(access.get(VirtualCorpusAccess_.status),
                         VirtualCorpusAccessStatus.DELETED));
-        
+
         Predicate userGroupStatus =
-                builder.notEqual(accessGroup.get("userGroup").get("status"),
-                        UserGroupStatus.DELETED);
-        Join<VirtualCorpusAccessGroup, UserGroup> userGroupMembers =
-                accessGroup.join("userGroup").join("members");
-        
-        Predicate memberStatus = builder.equal(userGroupMembers.get("status"),
-                GroupMemberStatus.ACTIVE);
-        
-        Predicate user = builder.equal(userGroupMembers.get("userId"), userId);
+                builder.notEqual(access.get(VirtualCorpusAccess_.userGroup)
+                        .get(UserGroup_.status), UserGroupStatus.DELETED);
+        Join<UserGroup, UserGroupMember> members = access
+                .join(VirtualCorpusAccess_.userGroup).join(UserGroup_.members);
+
+        Predicate memberStatus = builder.equal(
+                members.get(UserGroupMember_.status), GroupMemberStatus.ACTIVE);
+
+        Predicate user =
+                builder.equal(members.get(UserGroupMember_.userId), userId);
 
         query.select(virtualCorpus);
         query.where(
@@ -155,18 +172,17 @@
 
     public Set<VirtualCorpus> retrieveVCByUser (String userId)
             throws KustvaktException {
-        if (userId == null || userId.isEmpty()) {
-            throw new KustvaktException(StatusCodes.MISSING_ARGUMENT, "userId",
-                    userId);
-        }
+        ParameterChecker.checkStringValue(userId, "userId");
+
         CriteriaBuilder builder = entityManager.getCriteriaBuilder();
         CriteriaQuery<VirtualCorpus> query =
                 builder.createQuery(VirtualCorpus.class);
 
         Root<VirtualCorpus> virtualCorpus = query.from(VirtualCorpus.class);
         Predicate predicate = builder.or(
-                builder.equal(virtualCorpus.get("createdBy"), userId),
-                builder.equal(virtualCorpus.get("type"),
+                builder.equal(virtualCorpus.get(VirtualCorpus_.createdBy),
+                        userId),
+                builder.equal(virtualCorpus.get(VirtualCorpus_.type),
                         VirtualCorpusType.PREDEFINED));
 
 
@@ -183,10 +199,31 @@
         return vcSet;
     }
 
+    public List<VirtualCorpus> retrieveVCByGroup (int groupId)
+            throws KustvaktException {
+        ParameterChecker.checkIntegerValue(groupId, "groupId");
+
+        CriteriaBuilder builder = entityManager.getCriteriaBuilder();
+        CriteriaQuery<VirtualCorpus> query =
+                builder.createQuery(VirtualCorpus.class);
+
+        Root<VirtualCorpus> virtualCorpus = query.from(VirtualCorpus.class);
+        ListJoin<VirtualCorpus, VirtualCorpusAccess> corpusAccess =
+                virtualCorpus.join(VirtualCorpus_.virtualCorpusAccess);
+        Join<VirtualCorpusAccess, UserGroup> accessGroup =
+                corpusAccess.join(VirtualCorpusAccess_.userGroup);
+
+        query.select(virtualCorpus);
+        query.where(builder.equal(accessGroup.get(UserGroup_.id), groupId));
+        Query q = entityManager.createQuery(query);
+        return q.getResultList();
+    }
 
     // EM: what is needed for admin?
     public List<VirtualCorpus> retrieveVirtualCorpusByAdmin () {
         return null;
 
     }
+
+
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/entity/Role.java b/full/src/main/java/de/ids_mannheim/korap/entity/Role.java
index 685bf92..2d2571e 100644
--- a/full/src/main/java/de/ids_mannheim/korap/entity/Role.java
+++ b/full/src/main/java/de/ids_mannheim/korap/entity/Role.java
@@ -35,10 +35,10 @@
     @ManyToMany(mappedBy = "roles", fetch = FetchType.LAZY)
     private List<UserGroupMember> userGroupMembers;
 
-    @OneToMany(mappedBy = "role", fetch = FetchType.LAZY)
+    @OneToMany(mappedBy = "role", fetch = FetchType.EAGER)
     private List<Privilege> privileges;
 
     public String toString () {
-        return "id=" + id + "name=" + name;
+        return "id=" + id + ", name=" + name;
     }
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/entity/UserGroup.java b/full/src/main/java/de/ids_mannheim/korap/entity/UserGroup.java
index 7dc49b8..1ff0425 100644
--- a/full/src/main/java/de/ids_mannheim/korap/entity/UserGroup.java
+++ b/full/src/main/java/de/ids_mannheim/korap/entity/UserGroup.java
@@ -13,9 +13,6 @@
 import javax.persistence.OneToMany;
 import javax.persistence.Table;
 
-import org.hibernate.annotations.Fetch;
-import org.hibernate.annotations.FetchMode;
-
 import de.ids_mannheim.korap.constant.UserGroupStatus;
 import lombok.Getter;
 import lombok.Setter;
@@ -48,12 +45,11 @@
     @Enumerated(EnumType.STRING)
     private UserGroupStatus status;
 
-    @Fetch(FetchMode.SELECT)
-    @OneToMany(mappedBy="group")//, fetch = FetchType.LAZY)
+    @OneToMany(mappedBy="group", fetch = FetchType.LAZY)
     List<UserGroupMember> members;
 
     @OneToMany(mappedBy = "userGroup", fetch = FetchType.LAZY)
-    private List<VirtualCorpusAccessGroup> virtualCorpusAccessGroup;
+    private List<VirtualCorpusAccess> virtualCorpusAccess;
 
 
     @Override
diff --git a/full/src/main/java/de/ids_mannheim/korap/entity/UserGroupMember.java b/full/src/main/java/de/ids_mannheim/korap/entity/UserGroupMember.java
index 696c5c7..a4e9598 100644
--- a/full/src/main/java/de/ids_mannheim/korap/entity/UserGroupMember.java
+++ b/full/src/main/java/de/ids_mannheim/korap/entity/UserGroupMember.java
@@ -1,6 +1,6 @@
 package de.ids_mannheim.korap.entity;
 
-import java.util.Set;
+import java.util.List;
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -19,15 +19,17 @@
 import javax.persistence.UniqueConstraint;
 
 import de.ids_mannheim.korap.constant.GroupMemberStatus;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.constant.PredefinedRole;
 import lombok.Getter;
 import lombok.Setter;
 
-/** Describes members of user groups.
+/** Describes members of user groups. Only member of predefined role 
+ *  group admin can see the rest of members.
  * 
  *  @author margaretha
  *  @see UserGroup
  *  @see Role
+ *  @see PredefinedRole
  */
 @Setter
 @Getter
@@ -45,7 +47,7 @@
     private String createdBy;
     @Column(name = "deleted_by")
     private String deletedBy;
-    
+
     @Enumerated(EnumType.STRING)
     private GroupMemberStatus status;
 
@@ -53,7 +55,10 @@
     @JoinColumn(name = "group_id")
     private UserGroup group;
 
-    @ManyToMany(fetch = FetchType.LAZY)
+    /** Information about roles is deemed always necessary to describe a member.
+     * 
+     */
+    @ManyToMany(fetch = FetchType.EAGER)
     @JoinTable(name = "group_member_role",
             joinColumns = @JoinColumn(name = "group_member_id",
                     referencedColumnName = "id"),
@@ -61,23 +66,8 @@
                     referencedColumnName = "id"),
             uniqueConstraints = @UniqueConstraint(
                     columnNames = { "group_member_id", "role_id" }))
-    private Set<Role> roles;
+    private List<Role> roles;
 
-
-    public UserGroupMember createMember (String userId, String createdBy,
-            UserGroup userGroup, Set<Role> roles) throws KustvaktException {
-//        checkStringValue(userId, "userId");
-//        checkStringValue(createdBy, "createdBy");
-        
-        UserGroupMember member = new UserGroupMember();
-        member.setUserId(userId);
-        member.setCreatedBy(createdBy);
-        member.setGroup(userGroup);
-        member.setStatus(GroupMemberStatus.PENDING);
-        member.setRoles(roles);
-        return member;
-    }
-    
     @Override
     public String toString () {
         return "id=" + id + ", group= " + group + ", userId= " + userId
diff --git a/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpus.java b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpus.java
index deccdb8..8413c24 100644
--- a/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpus.java
+++ b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpus.java
@@ -14,6 +14,7 @@
 import javax.persistence.Table;
 
 import de.ids_mannheim.korap.constant.VirtualCorpusType;
+import de.ids_mannheim.korap.user.User.CorpusAccess;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -25,7 +26,7 @@
  *   
  * @author margaretha
  *
- * @see VirtualCorpusAccessGroup
+ * @see VirtualCorpusAccess
  * @see UserGroup
  */
 @Setter
@@ -42,8 +43,9 @@
     private VirtualCorpusType type;
     private String status;
     private String description;
+    @Enumerated(EnumType.STRING)
     @Column(name = "required_access")
-    private String requiredAccess;
+    private CorpusAccess requiredAccess;
     @Column(name = "collection_query")
     private String collectionQuery;
     private String definition;
@@ -51,7 +53,7 @@
     private String createdBy;
 
     @OneToMany(mappedBy = "virtualCorpus", fetch=FetchType.LAZY)
-    private List<VirtualCorpusAccessGroup> accessGroup;
+    private List<VirtualCorpusAccess> virtualCorpusAccess;
 
     @Override
     public String toString () {
diff --git a/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpusAccess.java b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpusAccess.java
index 6fbedf6..873aac7 100644
--- a/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpusAccess.java
+++ b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpusAccess.java
@@ -28,7 +28,7 @@
 @Getter
 @Entity
 @Table(name = "virtual_corpus_access")
-public class VirtualCorpusAccessGroup {
+public class VirtualCorpusAccess {
 
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
diff --git a/full/src/main/resources/db/insert/V3.1__insert_virtual_corpus.sql b/full/src/main/resources/db/insert/V3.1__insert_virtual_corpus.sql
index 442a39c..db77480 100644
--- a/full/src/main/resources/db/insert/V3.1__insert_virtual_corpus.sql
+++ b/full/src/main/resources/db/insert/V3.1__insert_virtual_corpus.sql
@@ -2,16 +2,16 @@
 
 -- user groups
 INSERT INTO user_group(name,status,created_by) 
-	VALUES ("dory group","active","dory");
+	VALUES ("dory group","ACTIVE","dory");
 
 INSERT INTO user_group(name,status,created_by) 
-	VALUES ("auto group","hidden","system");
+	VALUES ("auto group","HIDDEN","system");
 
 INSERT INTO user_group(name,status,created_by) 
-	VALUES ("all users","hidden","system");
+	VALUES ("all users","HIDDEN","system");
 
 INSERT INTO user_group(name,status,created_by) 
-	VALUES ("deleted group","deleted","dory");
+	VALUES ("deleted group","DELETED","dory");
 
 
 
diff --git a/full/src/main/resources/db/insert/V3.3__insert_member_roles.sql b/full/src/main/resources/db/insert/V3.3__insert_member_roles.sql
new file mode 100644
index 0000000..459b5e2
--- /dev/null
+++ b/full/src/main/resources/db/insert/V3.3__insert_member_roles.sql
@@ -0,0 +1,28 @@
+-- member roles
+-- dory group
+INSERT INTO group_member_role(group_member_id,role_id)
+SELECT
+	(SELECT id FROM user_group_member WHERE user_id="dory" AND group_id=1),
+	(SELECT id FROM role WHERE name = "group admin");
+	
+INSERT INTO group_member_role(group_member_id,role_id)
+SELECT
+	(SELECT id FROM user_group_member WHERE user_id="dory" AND group_id=1),
+	(SELECT id FROM role WHERE name = "vc admin");
+	
+INSERT INTO group_member_role(group_member_id,role_id)
+SELECT
+	(SELECT id FROM user_group_member WHERE user_id="nemo" AND group_id=1),
+	(SELECT id FROM role WHERE name = "group member");
+	
+INSERT INTO group_member_role(group_member_id,role_id)
+SELECT
+	(SELECT id FROM user_group_member WHERE user_id="nemo" AND group_id=1),
+	(SELECT id FROM role WHERE name = "vc member");
+
+-- auto group
+INSERT INTO group_member_role(group_member_id,role_id)
+SELECT
+	(SELECT id FROM user_group_member WHERE user_id="pearl" AND group_id=2),
+	(SELECT id FROM role WHERE name = "vc member");
+
diff --git a/full/src/main/resources/db/new-sqlite/V1.1__create_virtual_corpus_tables.sql b/full/src/main/resources/db/new-sqlite/V1.1__create_virtual_corpus_tables.sql
index 27fb035..91b01a7 100644
--- a/full/src/main/resources/db/new-sqlite/V1.1__create_virtual_corpus_tables.sql
+++ b/full/src/main/resources/db/new-sqlite/V1.1__create_virtual_corpus_tables.sql
@@ -21,7 +21,8 @@
   id INTEGER PRIMARY KEY AUTOINCREMENT,
   name varchar(100) NOT NULL,
   status varchar(100) NOT NULL,
-  created_by varchar(100) NOT NULL
+  created_by varchar(100) NOT NULL,
+  deleted_by varchar(100) DEFAULT NULL
 );
 
 CREATE INDEX user_group_index ON user_group(status);
diff --git a/full/src/main/resources/db/predefined/V3.2__insert_predefined_roles.sql b/full/src/main/resources/db/predefined/V3.2__insert_predefined_roles.sql
index fdb8031..c9409ea 100644
--- a/full/src/main/resources/db/predefined/V3.2__insert_predefined_roles.sql
+++ b/full/src/main/resources/db/predefined/V3.2__insert_predefined_roles.sql
@@ -1,8 +1,8 @@
 -- roles
 INSERT INTO role(name) VALUES ("group admin");
 INSERT INTO role(name) VALUES ("group member");
-INSERT INTO role(name) VALUES ("VC admin");
-INSERT INTO role(name) VALUES ("VC member");
+INSERT INTO role(name) VALUES ("vc admin");
+INSERT INTO role(name) VALUES ("vc member");
 
 -- privileges
 INSERT INTO privilege(name,role_id)
diff --git a/full/src/main/resources/jdbc.properties b/full/src/main/resources/jdbc.properties
index 65fba6b..9b888f0 100644
--- a/full/src/main/resources/jdbc.properties
+++ b/full/src/main/resources/jdbc.properties
@@ -9,7 +9,7 @@
 #jdbc.password=password
 
 # db.insert contains test data, omit it in production setting
-#jdbc.schemaPath=db.new-mysql, db.insert
+#jdbc.schemaPath=db.new-mysql, db.insert, db.predefined
 
 
 #-------------------------------------------------------------------------------
@@ -22,4 +22,4 @@
 jdbc.username=pc
 jdbc.password=pc
 # db.insert contains test data, omit it in production setting
-jdbc.schemaPath=db.new-sqlite, db.insert
+jdbc.schemaPath=db.new-sqlite, db.insert, db.predefined
