diff --git a/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java b/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
index 52de571..019c988 100644
--- a/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
+++ b/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
@@ -121,9 +121,7 @@
     public static final int GROUP_MEMBER_DELETED = 1603;
     public static final int GROUP_MEMBER_NOT_FOUND = 1604;
     public static final int INVITATION_EXPIRED = 1605;
-    @Deprecated
-    public static final int GROUP_NOT_FOUND = 1606;
-    public static final int GROUP_DELETED = 1607;
+    public static final int GROUP_DELETED = 1606;
     
     /**
      * 1800 Oauth2 and OpenID
diff --git a/core/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java b/core/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java
index 383def3..d3b88a8 100644
--- a/core/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java
+++ b/core/src/main/java/de/ids_mannheim/korap/web/controller/SearchController.java
@@ -50,7 +50,6 @@
 @Path("/")
 @ResourceFilters({ APIVersionFilter.class, AuthenticationFilter.class,
         DemoUserFilter.class, PiwikFilter.class })
-@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
 public class SearchController {
 
     private static final boolean DEBUG = false;
@@ -86,6 +85,7 @@
 //     MH: ref query parameter removed!
 //    @GET
 //    @Path("{version}/query")
+//    @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
     public Response serializeQuery (@Context Locale locale,
             @Context SecurityContext securityContext, @QueryParam("q") String q,
             @QueryParam("ql") String ql, @QueryParam("v") String v,
@@ -116,6 +116,7 @@
 //    This web service is DISABLED until there is a need for it. 
 //    @POST
 //    @Path("{version}/search")
+//    @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
     public Response searchPost (@Context SecurityContext context,
             @Context Locale locale, 
             @Context HttpHeaders headers,
@@ -173,6 +174,7 @@
      */
     @GET
     @Path("{version}/search")
+    @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
     public Response searchGet (@Context SecurityContext securityContext,
             @Context HttpServletRequest request,
             @Context HttpHeaders headers, @Context Locale locale,
@@ -209,6 +211,7 @@
     // EM: legacy support
     @Deprecated
     @GET
+    @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
     @Path("{version}/corpus/{corpusId}/{docId}/{textId}/{matchId}/matchInfo")
     public Response getMatchInfo (@Context SecurityContext ctx,
             @Context HttpHeaders headers, @Context Locale locale,
@@ -227,6 +230,7 @@
     }
     
     @GET
+    @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
     @Path("{version}/corpus/{corpusId}/{docId}/{textId}/{matchId}")
     public Response retrieveMatchInfo (@Context SecurityContext ctx,
             @Context HttpHeaders headers, @Context Locale locale,
@@ -264,6 +268,7 @@
     // This is currently identical to LiteService#getMeta(),
     // but may need auth code to work following policies
     @GET
+    @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
     @Path("{version}/corpus/{corpusId}/{docId}/{textId}")
     public Response getMetadata (@PathParam("corpusId") String corpusId,
             @PathParam("docId") String docId,
@@ -286,6 +291,7 @@
 //  EM: This web service requires Karang and is DISABLED.
 //    @POST
 //    @Path("{version}/colloc")
+//    @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
     public Response getCollocationBase (@QueryParam("q") String query) {
         String result;
         try {
diff --git a/full/Changes b/full/Changes
index 8d1347a..030fdfb 100644
--- a/full/Changes
+++ b/full/Changes
@@ -8,6 +8,8 @@
    - Added support for multiple cq parameters (margaretha, resolved #46)
 13/12/2019
    - Handled pipe errors and added tests (margaretha)
+19/12/2019
+   - Updated create update user-group API (margaretha)
     
 # version 0.62.2
 17/10/2019
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 28b8650..7564121 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
@@ -55,14 +55,15 @@
     @Autowired
     private RoleDao roleDao;
 
-    public int createGroup (String name, String createdBy,
-            UserGroupStatus status) throws KustvaktException {
+    public int createGroup (String name, String description,
+            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.setDescription(description);
         group.setStatus(status);
         group.setCreatedBy(createdBy);
         entityManager.persist(group);
@@ -112,13 +113,11 @@
         }
     }
 
-    public void editGroupName (int groupId, String name)
-            throws KustvaktException {
-        UserGroup group = retrieveGroupById(groupId);
-        group.setName(name);
+    public void updateGroup (UserGroup group) throws KustvaktException {
+        ParameterChecker.checkObjectValue(group, "user-group");
         entityManager.merge(group);
     }
-
+    
     /**
      * Retrieves the UserGroup by the given group id. This methods
      * does not
@@ -156,7 +155,7 @@
             return (UserGroup) q.getSingleResult();
         }
         catch (NoResultException e) {
-            throw new KustvaktException(StatusCodes.GROUP_NOT_FOUND,
+            throw new KustvaktException(StatusCodes.NO_RESOURCE_FOUND,
                     "Group with id " + groupId + " is not found",
                     String.valueOf(groupId), e);
         }
diff --git a/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java b/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java
index 69900d8..a2b2732 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java
@@ -21,6 +21,7 @@
 
     private int id;
     private String name;
+    private String description;
     private String owner;
     private UserGroupStatus status;
     
diff --git a/full/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java b/full/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java
index cadedf9..5071635 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java
@@ -33,6 +33,7 @@
         UserGroupDto dto = new UserGroupDto();
         dto.setId(group.getId());
         dto.setName(group.getName());
+        dto.setDescription(group.getDescription());
         dto.setStatus(group.getStatus());
         dto.setOwner(group.getCreatedBy());
         dto.setUserMemberStatus(userMemberStatus);
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 d3e8d47..0f2d7fd 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
@@ -40,8 +40,8 @@
     @GeneratedValue(strategy = GenerationType.IDENTITY)
     private int id;
     // unique
-    @Column(name = "name")
     private String name;
+    private String description;
     @Column(name = "created_by")
     private String createdBy;
     @Column(name = "deleted_by")
diff --git a/full/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java b/full/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java
index 090660e..7b0724f 100644
--- a/full/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java
+++ b/full/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java
@@ -212,11 +212,11 @@
      * 
      * 
      */
-    public boolean createUserGroup (String groupName, String members, String createdBy)
+    public boolean createUpdateUserGroup (String groupName, String description, String createdBy)
             throws KustvaktException {
         ParameterChecker.checkNameValue(groupName, "groupName");
         ParameterChecker.checkStringValue(createdBy, "createdBy");
-        
+
         if (!groupNamePattern.matcher(groupName).matches()) {
             throw new KustvaktException(StatusCodes.INVALID_ARGUMENT,
                     "User-group name must only contains letters, numbers, "
@@ -229,7 +229,6 @@
         try{
             userGroup = userGroupDao.retrieveGroupByName(groupName,false);
             groupExists = true;
-            
         }
         catch (KustvaktException e) {
             if (e.getStatusCode() != StatusCodes.NO_RESOURCE_FOUND){
@@ -239,7 +238,7 @@
         
         if (!groupExists){
             try {
-                userGroupDao.createGroup(groupName, createdBy,
+                userGroupDao.createGroup(groupName, description, createdBy,
                         UserGroupStatus.ACTIVE);
                 userGroup = userGroupDao.retrieveGroupByName(groupName,false);
             }
@@ -257,18 +256,10 @@
                 throw new KustvaktException(StatusCodes.DB_INSERT_FAILED,
                         cause.getMessage());
             }
-            
-            if (members != null && !members.isEmpty()){
-                String[] groupMembers = members.split(",");
-                for (String memberUsername : groupMembers) {
-                    if (memberUsername.equals(createdBy)) {
-                        // skip owner, already added while creating group.
-                        continue;
-                    }
-                    inviteGroupMember(memberUsername, userGroup, createdBy,
-                            GroupMemberStatus.PENDING);
-                }
-            }
+        }
+        else if (description != null) {
+            userGroup.setDescription(description);
+            userGroupDao.updateGroup(userGroup);
         }
         return groupExists;
     }
@@ -297,8 +288,8 @@
     public int createAutoHiddenGroup () throws KustvaktException {
         String code = random.createRandomCode();
         String groupName = "auto-"+code;
-        int groupId = userGroupDao.createGroup(groupName, "system",
-                UserGroupStatus.HIDDEN);
+        int groupId = userGroupDao.createGroup(groupName, "auto-hidden-group",
+                "system", UserGroupStatus.HIDDEN);
 
         return groupId;
     }
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
index 84c0afa..0d3154e 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
@@ -149,48 +149,33 @@
     }
 
     /**
-     * Creates a user group where the user in the token context is the
-     * group owner, and invites all users specified as members, see
-     * {@link #inviteGroupMembers(SecurityContext, String, UserGroupJson)}.
-     * The invited users are added as group members with status
-     * GroupMemberStatus.PENDING.
-     * 
-     * If a user accepts the invitation by using the service:
-     * {@link UserGroupController#subscribeToGroup(SecurityContext, String)},
-     * his GroupMemberStatus will be updated to
-     * GroupMemberStatus.ACTIVE.
-     * 
-     * If a user rejects the invitation by using the service:
-     * {@link UserGroupController#unsubscribeFromGroup(SecurityContext, String)},
-     * his GroupMemberStatus will be updated to
-     * GroupMemberStatus.DELETED.
+     * Creates a user group with the group owner as the only group
+     * member. The group owner is the authenticated user in the token
+     * context.
      * 
      * @param securityContext
-     * @param members
-     *            usernames of users to be invited as group members
-     *            (separated by comma)
+     * @param groupName the name of the group            
      * @return if a new group created, HTTP response status 201
      *         Created, otherwise 204 No Content.
      */
     @PUT
     @Path("@{groupName}")
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
-    public Response createUserGroup (@Context SecurityContext securityContext,
+    public Response createUpdateUserGroup (@Context SecurityContext securityContext,
             @PathParam("groupName") String groupName,
-            @FormParam("members") String members) {
+            @FormParam("description") String description) {
         TokenContext context =
                 (TokenContext) securityContext.getUserPrincipal();
         try {
             scopeService.verifyScope(context, OAuth2Scope.CREATE_USER_GROUP);
-            boolean groupExists = service.createUserGroup(groupName, members,
-                    context.getUsername());
+            boolean groupExists = service.createUpdateUserGroup(groupName,
+                    description, context.getUsername());
             if (groupExists) {
                 return Response.noContent().build();
             }
             else {
                 return Response.status(HttpStatus.SC_CREATED).build();
             }
-
         }
         catch (KustvaktException e) {
             throw kustvaktResponseHandler.throwit(e);
@@ -256,7 +241,21 @@
 
     /**
      * Invites users to join a user-group specified by the
-     * groupName.Only user-group admins and system admins are allowed.
+     * groupName. Only user-group admins and system admins are
+     * allowed to use this service.
+     *  
+     * The invited users are added as group members with status
+     * GroupMemberStatus.PENDING.
+     * 
+     * If a user accepts the invitation by using the service:
+     * {@link UserGroupController#subscribeToGroup(SecurityContext, String)},
+     * his GroupMemberStatus will be updated to
+     * GroupMemberStatus.ACTIVE.
+     * 
+     * If a user rejects the invitation by using the service:
+     * {@link UserGroupController#unsubscribeFromGroup(SecurityContext, String)},
+     * his GroupMemberStatus will be updated to
+     * GroupMemberStatus.DELETED.
      * 
      * @param securityContext
      * @param members
@@ -289,9 +288,12 @@
      * as well.
      * 
      * @param securityContext
-     * @param groupName the group name
-     * @param memberUsername the username of a group-member 
-     * @param roleIds the role ids for the member
+     * @param groupName
+     *            the group name
+     * @param memberUsername
+     *            the username of a group-member
+     * @param roleIds
+     *            the role ids for the member
      * @return
      */
     @POST
diff --git a/full/src/main/resources/db/mysql/V1.1__create_virtual_corpus_tables.sql b/full/src/main/resources/db/mysql/V1.1__create_virtual_corpus_tables.sql
index ac1f81d..590e318 100644
--- a/full/src/main/resources/db/mysql/V1.1__create_virtual_corpus_tables.sql
+++ b/full/src/main/resources/db/mysql/V1.1__create_virtual_corpus_tables.sql
@@ -1,13 +1,13 @@
 CREATE TABLE IF NOT EXISTS role (
   id INTEGER PRIMARY KEY AUTO_INCREMENT,
-  name varchar(100) NOT NULL,
+  name VARCHAR(100) NOT NULL,
   UNIQUE INDEX name_index(name)
 );
 
 
 CREATE TABLE IF NOT EXISTS privilege (
   id INTEGER PRIMARY KEY AUTO_INCREMENT,
-  name varchar(20) NOT NULL,
+  name VARCHAR(20) NOT NULL,
   role_id int NOT NULL,
   UNIQUE INDEX privilege_index(name, role_id),
   FOREIGN KEY (role_id) 
@@ -18,21 +18,22 @@
 
 CREATE TABLE IF NOT EXISTS user_group (
   id INTEGER PRIMARY KEY AUTO_INCREMENT,
-  name varchar(100) NOT NULL,
-  status varchar(100) NOT NULL,
-  created_by varchar(100) NOT NULL,
-  deleted_by varchar(100) DEFAULT NULL,
+  name VARCHAR(100) NOT NULL,
+  description VARCHAR(255) DEFAULT NULL,
+  status VARCHAR(100) NOT NULL,
+  created_by VARCHAR(100) NOT NULL,
+  deleted_by VARCHAR(100) DEFAULT NULL,
   INDEX status_index(status),
   UNIQUE INDEX unique_name(name);
 );
 
 CREATE TABLE IF NOT EXISTS user_group_member (
   id INTEGER PRIMARY KEY AUTO_INCREMENT,
-  user_id varchar(100) NOT NULL,
+  user_id VARCHAR(100) NOT NULL,
   group_id int(11) NOT NULL,
-  status varchar(100) NOT NULL,
-  created_by varchar(100) NOT NULL,
-  deleted_by varchar(100) DEFAULT NULL,
+  status VARCHAR(100) NOT NULL,
+  created_by VARCHAR(100) NOT NULL,
+  deleted_by VARCHAR(100) DEFAULT NULL,
   status_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   UNIQUE INDEX unique_index (user_id,group_id),
   INDEX status_index(status),
@@ -56,14 +57,14 @@
 
 CREATE TABLE IF NOT EXISTS virtual_corpus (
   id INTEGER PRIMARY KEY AUTO_INCREMENT,
-  name varchar(255) NOT NULL,
-  type varchar(100) NOT NULL,
-  required_access varchar(100) NOT NULL,
-  created_by varchar(100) NOT NULL,
-  description varchar(255) DEFAULT NULL,
-  status varchar(100) DEFAULT NULL,
+  name VARCHAR(255) NOT NULL,
+  type VARCHAR(100) NOT NULL,
+  required_access VARCHAR(100) NOT NULL,
+  created_by VARCHAR(100) NOT NULL,
+  description VARCHAR(255) DEFAULT NULL,
+  status VARCHAR(100) DEFAULT NULL,
   corpus_query TEXT NOT NULL,
-  definition varchar(255) DEFAULT NULL,
+  definition VARCHAR(255) DEFAULT NULL,
   is_cached BOOLEAN DEFAULT 0,
   UNIQUE INDEX unique_index (name,created_by),
   INDEX owner_index (created_by),
@@ -74,10 +75,10 @@
   id INTEGER PRIMARY KEY AUTO_INCREMENT,
   virtual_corpus_id int(11) NOT NULL,
   user_group_id int(11) NOT NULL,
-  status varchar(100) NOT NULL,
-  created_by varchar(100) NOT NULL,
-  approved_by varchar(100) DEFAULT NULL,
-  deleted_by varchar(100) DEFAULT NULL,
+  status VARCHAR(100) NOT NULL,
+  created_by VARCHAR(100) NOT NULL,
+  approved_by VARCHAR(100) DEFAULT NULL,
+  deleted_by VARCHAR(100) DEFAULT NULL,
   UNIQUE INDEX unique_index (virtual_corpus_id,user_group_id),
   INDEX status_index(status),
   FOREIGN KEY (user_group_id) 
diff --git a/full/src/main/resources/db/mysql/V1.2__create_admin_table.sql b/full/src/main/resources/db/mysql/V1.2__create_admin_table.sql
index 7c8ce73..39a7114 100644
--- a/full/src/main/resources/db/mysql/V1.2__create_admin_table.sql
+++ b/full/src/main/resources/db/mysql/V1.2__create_admin_table.sql
@@ -1,5 +1,5 @@
 CREATE TABLE IF NOT EXISTS admin (
 	id INTEGER PRIMARY KEY AUTO_INCREMENT,
-	user_id varchar(100) NOT NULL,
+	user_id VARCHAR(100) NOT NULL,
 	UNIQUE INDEX unique_index (user_id)
 );
\ No newline at end of file
diff --git a/full/src/main/resources/db/sqlite/V1.1__create_virtual_corpus_tables.sql b/full/src/main/resources/db/sqlite/V1.1__create_virtual_corpus_tables.sql
index 0198da2..dbb9901 100644
--- a/full/src/main/resources/db/sqlite/V1.1__create_virtual_corpus_tables.sql
+++ b/full/src/main/resources/db/sqlite/V1.1__create_virtual_corpus_tables.sql
@@ -20,6 +20,7 @@
 CREATE TABLE IF NOT EXISTS user_group (
   id INTEGER PRIMARY KEY AUTOINCREMENT,
   name VARCHAR(100) NOT NULL,
+  description VARCHAR(255)DEFAULT NULL,
   status VARCHAR(100) NOT NULL,
   created_by VARCHAR(100) NOT NULL,
   deleted_by VARCHAR(100) DEFAULT NULL
diff --git a/full/src/main/resources/db/sqlite/V1.3__create_admin_table.sql b/full/src/main/resources/db/sqlite/V1.3__create_admin_table.sql
index f13861c..35b934b 100644
--- a/full/src/main/resources/db/sqlite/V1.3__create_admin_table.sql
+++ b/full/src/main/resources/db/sqlite/V1.3__create_admin_table.sql
@@ -1,6 +1,6 @@
 CREATE TABLE IF NOT EXISTS admin(
 	id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
-	user_id varchar(100) NOT NULL
+	user_id VARCHAR(100) NOT NULL
 );
 
 CREATE UNIQUE INDEX admin_index on admin(user_id);
\ No newline at end of file
diff --git a/full/src/test/java/de/ids_mannheim/korap/dao/UserGroupDaoTest.java b/full/src/test/java/de/ids_mannheim/korap/dao/UserGroupDaoTest.java
index d1fda36..1aa6ca2 100644
--- a/full/src/test/java/de/ids_mannheim/korap/dao/UserGroupDaoTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/dao/UserGroupDaoTest.java
@@ -51,7 +51,7 @@
         String groupName = "test group";
         String createdBy = "test class";
         // create group
-        int groupId = userGroupDao.createGroup(groupName, createdBy,
+        int groupId = userGroupDao.createGroup(groupName, null, createdBy,
                 UserGroupStatus.ACTIVE);
 
         // retrieve group
@@ -126,20 +126,6 @@
     }
 
     @Test
-    public void editExistingGroupName () throws KustvaktException {
-        UserGroup group = userGroupDao.retrieveGroupById(1);
-        String name = group.getName();
-        String newName = "new vc name";
-        userGroupDao.editGroupName(1, newName);
-        group = userGroupDao.retrieveGroupById(1);
-        assertEquals(newName, group.getName());
-
-        userGroupDao.editGroupName(1, name);
-        group = userGroupDao.retrieveGroupById(1);
-        assertEquals(name, group.getName());
-    }
-
-    @Test
     public void addVCToGroup () throws KustvaktException {
         // dory group
         int groupId = 2;
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/UserGroupControllerAdminTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserGroupControllerAdminTest.java
index 77765e1..bf78727 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/UserGroupControllerAdminTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserGroupControllerAdminTest.java
@@ -143,9 +143,6 @@
 
         String groupName = "admin-test-group";
 
-        MultivaluedMap<String, String> form = new MultivaluedMapImpl();
-        form.add("members", "marlin,nemo");
-
         ClientResponse response = resource().path(API_VERSION).path("group")
                 .path("@" + groupName)
                 .type(MediaType.APPLICATION_FORM_URLENCODED)
@@ -153,7 +150,7 @@
                         HttpAuthorizationHandler
                                 .createBasicAuthorizationHeaderValue(testUser,
                                         "password"))
-                .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32").entity(form)
+                .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
                 .put(ClientResponse.class);
 
         assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
@@ -164,8 +161,8 @@
         node = node.get(0);
         assertEquals(groupName, node.get("name").asText());
 
-        testMemberRole("marlin", groupName);
         testInviteMember(groupName);
+        testMemberRole("marlin", groupName);
         testDeleteMember(groupName);
         testDeleteGroup(groupName);
     }
@@ -314,7 +311,7 @@
             throws UniformInterfaceException, ClientHandlerException,
             KustvaktException {
         MultivaluedMap<String, String> form = new MultivaluedMapImpl();
-        form.add("members", "darla");
+        form.add("members", "marlin,nemo,darla");
 
         ClientResponse response = resource().path(API_VERSION).path("group")
                 .path("@" + groupName).path("invite")
@@ -333,8 +330,8 @@
 
         assertEquals("darla", node.at("/members/3/userId").asText());
         assertEquals(GroupMemberStatus.PENDING.name(),
-                node.at("/members/3/status").asText());
-        assertEquals(0, node.at("/members/3/roles").size());
+                node.at("/members/1/status").asText());
+        assertEquals(0, node.at("/members/1/roles").size());
     }
 
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/UserGroupControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserGroupControllerTest.java
index 2770714..a03110d 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/UserGroupControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserGroupControllerTest.java
@@ -139,7 +139,7 @@
 
     
     @Test
-    public void testCreateGroupEmptyMembers () throws UniformInterfaceException,
+    public void testCreateGroupEmptyDescription () throws UniformInterfaceException,
             ClientHandlerException, KustvaktException {
         String groupName = "empty_group";
         ClientResponse response = testCreateUserGroup(groupName,"");
@@ -150,20 +150,20 @@
 
     
     @Test
-    public void testCreateGroupMissingMembers () throws UniformInterfaceException,
+    public void testCreateGroupMissingDescription () throws UniformInterfaceException,
             ClientHandlerException, KustvaktException {
-        String groupName = "missing-member-group";
+        String groupName = "missing-desc-group";
 
-        ClientResponse response = testCreateGroupWithoutMembers(groupName);
+        ClientResponse response = testCreateGroupWithoutDescription(groupName);
         assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
         deleteGroupByName(groupName);
     }
     
-    private ClientResponse testCreateUserGroup (String groupName, String members)
+    private ClientResponse testCreateUserGroup (String groupName, String description)
             throws UniformInterfaceException, ClientHandlerException,
             KustvaktException {
         MultivaluedMap<String, String> form = new MultivaluedMapImpl();
-        form.add("members", members);
+        form.add("description", description);
         
         ClientResponse response = resource().path(API_VERSION).path("group")
                 .path("@"+groupName).type(MediaType.APPLICATION_FORM_URLENCODED)
@@ -175,7 +175,7 @@
         return response;
     }
     
-    private ClientResponse testCreateGroupWithoutMembers (String groupName)
+    private ClientResponse testCreateGroupWithoutDescription (String groupName)
             throws UniformInterfaceException, ClientHandlerException,
             KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("group")
@@ -192,9 +192,8 @@
     public void testCreateGroupInvalidName () throws UniformInterfaceException,
             ClientHandlerException, KustvaktException {
         String groupName = "invalid-group-name$"; 
-        String members = "marlin,nemo";
 
-        ClientResponse response = testCreateUserGroup(groupName, members);
+        ClientResponse response = testCreateGroupWithoutDescription(groupName);
         assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus());
         
         JsonNode node = JsonUtils.readTree(response.getEntity(String.class));
@@ -208,9 +207,8 @@
     public void testCreateGroupNameTooShort () throws UniformInterfaceException,
             ClientHandlerException, KustvaktException {
         String groupName = "a"; 
-        String members = "marlin,nemo";
 
-        ClientResponse response = testCreateUserGroup(groupName, members);
+        ClientResponse response = testCreateGroupWithoutDescription(groupName);
         assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus());
         
         JsonNode node = JsonUtils.readTree(response.getEntity(String.class));
@@ -225,22 +223,24 @@
             ClientHandlerException, KustvaktException {
 
         String groupName = "new-user-group";
-        String members = "marlin,nemo";
-
-        ClientResponse response = testCreateUserGroup(groupName,members);
+        String description= "This is new-user-group.";
+        
+        ClientResponse response =
+                testCreateUserGroup(groupName, description);
         assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
         // same name
-        response = testCreateGroupWithoutMembers(groupName);
+        response = testCreateGroupWithoutDescription(groupName);
         assertEquals(Status.NO_CONTENT.getStatusCode(), response.getStatus());
 
         // list user group
-        JsonNode node = retrieveUserGroups(username);;
+        JsonNode node = retrieveUserGroups(username);
         assertEquals(1, node.size());
         node = node.get(0);
         assertEquals("new-user-group", node.get("name").asText());
+        assertEquals(description, node.get("description").asText());
 
         assertEquals(username, node.get("owner").asText());
-        assertEquals(3, node.get("members").size());
+        assertEquals(1, node.get("members").size());
         assertEquals(username, node.at("/members/0/userId").asText());
         assertEquals(GroupMemberStatus.ACTIVE.name(),
                 node.at("/members/0/status").asText());
@@ -249,11 +249,7 @@
         assertEquals(PredefinedRole.VC_ACCESS_ADMIN.name(),
                 node.at("/members/0/roles/1").asText());
 
-        assertEquals("marlin", node.at("/members/1/userId").asText());
-        assertEquals(GroupMemberStatus.PENDING.name(),
-                node.at("/members/1/status").asText());
-        assertEquals(0, node.at("/members/1/roles").size());
-
+        testUpdateUserGroup(groupName);
         testInviteMember(groupName);
 
         testDeleteMemberUnauthorized(groupName);
@@ -264,12 +260,24 @@
         testUnsubscribeToDeletedGroup(groupName);
     }
 
+    private void testUpdateUserGroup (String groupName)
+            throws UniformInterfaceException, ClientHandlerException,
+            KustvaktException {
+        String description = "Description is updated.";
+        ClientResponse response = testCreateUserGroup(groupName, description);
+        assertEquals(Status.NO_CONTENT.getStatusCode(), response.getStatus());
+
+        JsonNode node = retrieveUserGroups(username);
+        assertEquals(1, node.size());
+        assertEquals(description, node.get(0).get("description").asText());
+    }
+
     private void testDeleteMember (String groupName)
             throws UniformInterfaceException, ClientHandlerException,
             KustvaktException {
-        // delete marlin from group
+        // delete darla from group
         ClientResponse response = resource().path(API_VERSION).path("group")
-                .path("@"+groupName).path("~marlin")
+                .path("@"+groupName).path("~darla")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue(username, "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
@@ -284,7 +292,7 @@
         String entity = response.getEntity(String.class);
         JsonNode node = JsonUtils.readTree(entity);
         node = node.get(0);
-        assertEquals(3, node.get("members").size());
+        assertEquals(1, node.get("members").size());
     }
 
     private void testDeleteMemberUnauthorized (String groupName)
@@ -292,7 +300,7 @@
             KustvaktException {
         // nemo is a group member
         ClientResponse response = resource().path(API_VERSION).path("group")
-                .path("@"+groupName).path("~marlin")
+                .path("@"+groupName).path("~darla")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue("nemo", "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
@@ -473,12 +481,12 @@
 
         JsonNode node = JsonUtils.readTree(entity);
         node = node.get(0);
-        assertEquals(4, node.get("members").size());
+        assertEquals(2, node.get("members").size());
 
-        assertEquals("darla", node.at("/members/3/userId").asText());
+        assertEquals("darla", node.at("/members/1/userId").asText());
         assertEquals(GroupMemberStatus.PENDING.name(),
-                node.at("/members/3/status").asText());
-        assertEquals(0, node.at("/members/3/roles").size());
+                node.at("/members/1/status").asText());
+        assertEquals(0, node.at("/members/1/roles").size());
     }
 
     private void testInviteDeletedMember () throws UniformInterfaceException,
