diff --git a/Changes b/Changes
index 050dfc7..639a5fe 100644
--- a/Changes
+++ b/Changes
@@ -20,6 +20,10 @@
 - Deprecate VC access deletion.
 - Change default port to 8089.
 - Disallow scope all for non super clients.
+- Changed memberUsername to member in the new member-role-addition web-service.
+- Removed user-privileges from user-group list response.
+- 
+
 
 # version 0.74.1-SNAPSHOT
 
diff --git a/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java b/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java
index b5501d4..7803c53 100644
--- a/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java
+++ b/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java
@@ -28,7 +28,4 @@
 
     @JsonInclude(JsonInclude.Include.NON_EMPTY)
     private List<UserGroupMemberDto> members;
-
-    @JsonInclude(JsonInclude.Include.NON_NULL)
-    private List<PrivilegeType> userPrivileges;
 }
diff --git a/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java b/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java
index 3ffa646..7fbaa10 100644
--- a/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java
+++ b/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java
@@ -27,7 +27,7 @@
 public class UserGroupConverter {
 
     public UserGroupDto createUserGroupDto (UserGroup group,
-            List<UserGroupMember> members, Set<Role> roleSet) {
+            List<UserGroupMember> members) {
 
         UserGroupDto dto = new UserGroupDto();
         dto.setId(group.getId());
@@ -36,10 +36,6 @@
         dto.setStatus(group.getStatus());
         dto.setOwner(group.getCreatedBy());
 
-        if (roleSet != null) {
-            dto.setUserPrivileges(createPrivilegeList(roleSet));
-        }
-
         if (members != null) {
             ArrayList<UserGroupMemberDto> memberDtos = new ArrayList<>(
                     members.size());
diff --git a/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java b/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java
index 11e9c12..f73a9ec 100644
--- a/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java
+++ b/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java
@@ -93,10 +93,9 @@
         UserGroupDto groupDto;
         for (UserGroup group : userGroups) {
             members = retrieveMembers(group.getId(), username);
-            userAsMember = groupMemberDao.retrieveMemberById(username,
-                    group.getId());
-            groupDto = converter.createUserGroupDto(group, members, 
-                    userAsMember.getRoles());
+//            userAsMember = groupMemberDao.retrieveMemberById(username,
+//                    group.getId());
+            groupDto = converter.createUserGroupDto(group, members);
             dtos.add(groupDto);
         }
 
@@ -141,7 +140,7 @@
                 .retrieveHiddenGroupByQueryName(queryName);
         List<UserGroupMember> members = groupMemberDao
                 .retrieveMemberByGroupId(group.getId());
-        return converter.createUserGroupDto(group, members, null);
+        return converter.createUserGroupDto(group, members);
     }
 
     public List<UserGroupDto> retrieveUserGroupByStatus (String username,
@@ -156,7 +155,7 @@
         UserGroupDto groupDto;
         for (UserGroup group : userGroups) {
             members = groupMemberDao.retrieveMemberByGroupId(group.getId());
-            groupDto = converter.createUserGroupDto(group, members, null);
+            groupDto = converter.createUserGroupDto(group, members);
             dtos.add(groupDto);
         }
         return dtos;
@@ -373,7 +372,7 @@
             throws KustvaktException {
         UserGroup userGroup = userGroupDao.retrieveGroupByName(groupName, true);
         UserGroupDto groupDto = converter.createUserGroupDto(userGroup,
-                userGroup.getMembers(), null);
+                userGroup.getMembers());
         return groupDto;
     }
 
diff --git a/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java b/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
index a968946..dd39ffc 100644
--- a/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
+++ b/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
@@ -277,7 +277,7 @@
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     public Response addAdminRole (@Context SecurityContext securityContext,
             @PathParam("groupName") String groupName,
-            @FormParam("memberUsername") String memberUsername) {
+            @FormParam("member") String memberUsername) {
         TokenContext context = (TokenContext) securityContext
                 .getUserPrincipal();
         try {
@@ -311,7 +311,8 @@
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     public Response deleteMemberRoles (@Context SecurityContext securityContext,
             @PathParam("groupName") String groupName,
-            @FormParam("memberUsername") String memberUsername,
+            @FormParam("memberUsername") String memberUsername, // DEPRECATED
+            @FormParam("member") String member,
             @FormParam("roleId") List<Integer> roleIds,
             @FormParam("role") List<PredefinedRole> roles) {
         TokenContext context = (TokenContext) securityContext
@@ -326,6 +327,9 @@
                         + " removed in API v1.1."));
             }
             else {
+                memberUsername = (member!=null && !member.isEmpty()) 
+                        ? member : memberUsername;
+                        
                 service.deleteMemberRoles(context.getUsername(), groupName,
                         memberUsername, roles);
             }
diff --git a/src/test/java/de/ids_mannheim/korap/web/controller/usergroup/UserGroupTestBase.java b/src/test/java/de/ids_mannheim/korap/web/controller/usergroup/UserGroupTestBase.java
index 630ee66..82568c0 100644
--- a/src/test/java/de/ids_mannheim/korap/web/controller/usergroup/UserGroupTestBase.java
+++ b/src/test/java/de/ids_mannheim/korap/web/controller/usergroup/UserGroupTestBase.java
@@ -90,7 +90,7 @@
     protected Response addAdminRole (String groupName, String memberName,
             String addedBy) throws KustvaktException {
         Form form = new Form();
-        form.param("memberUsername", memberName);
+        form.param("member", memberName);
         form.param("role", PredefinedRole.GROUP_ADMIN.name());
 
         Response response = target().path(API_VERSION).path("group")
