diff --git a/src/main/java/de/ids_mannheim/korap/config/KustvaktClassLoader.java b/src/main/java/de/ids_mannheim/korap/config/KustvaktClassLoader.java
index c175824..f63a023 100644
--- a/src/main/java/de/ids_mannheim/korap/config/KustvaktClassLoader.java
+++ b/src/main/java/de/ids_mannheim/korap/config/KustvaktClassLoader.java
@@ -38,6 +38,8 @@
         return reflections.getTypesAnnotatedWith(annotation);
     }
 
+
+
     @Deprecated
     public static void registerResourceClasses() {
         PersistenceClient cl = BeanConfiguration.getBeans()
diff --git a/src/main/java/de/ids_mannheim/korap/interfaces/db/EntityHandlerIface.java b/src/main/java/de/ids_mannheim/korap/interfaces/db/EntityHandlerIface.java
index f349f23..ec70921 100644
--- a/src/main/java/de/ids_mannheim/korap/interfaces/db/EntityHandlerIface.java
+++ b/src/main/java/de/ids_mannheim/korap/interfaces/db/EntityHandlerIface.java
@@ -12,12 +12,16 @@
  * Time: 11:04 AM
  */
 public interface EntityHandlerIface {
+    @Deprecated
     UserSettings getUserSettings(Integer userid) throws KustvaktException;
 
+    @Deprecated
     int updateSettings(UserSettings settings) throws KustvaktException;
 
+    @Deprecated
     UserDetails getUserDetails(Integer userid) throws KustvaktException;
 
+    @Deprecated
     int updateUserDetails(UserDetails details) throws KustvaktException;
 
     //    List<UserQuery> getUserQueries(User user) throws KorAPException;
@@ -26,8 +30,8 @@
 
     //    void updateUserQueries(User user, List<UserQuery> newOnes) throws KorAPException;
 
-    User getAccount(String username) throws
-            EmptyResultException, KustvaktException;
+    User getAccount(String username)
+            throws EmptyResultException, KustvaktException;
 
     int updateAccount(User user) throws KustvaktException;
 
@@ -35,8 +39,8 @@
 
     int deleteAccount(Integer userid) throws KustvaktException;
 
-    int resetPassphrase(String username, String uriToken,
-            String passphrase) throws KustvaktException;
+    int resetPassphrase(String username, String uriToken, String passphrase)
+            throws KustvaktException;
 
     int activateAccount(String username, String uriToken)
             throws KustvaktException;
diff --git a/src/main/java/de/ids_mannheim/korap/interfaces/db/ResourceOperationIface.java b/src/main/java/de/ids_mannheim/korap/interfaces/db/ResourceOperationIface.java
index cfa4c99..d35f924 100644
--- a/src/main/java/de/ids_mannheim/korap/interfaces/db/ResourceOperationIface.java
+++ b/src/main/java/de/ids_mannheim/korap/interfaces/db/ResourceOperationIface.java
@@ -11,6 +11,8 @@
 // todo: user instance only required for auditing pointcut operations
 public interface ResourceOperationIface<T extends KustvaktResource> {
 
+    // todo: remove and use type reference!
+    @Deprecated
     Class<T> getType();
 
     <T extends KustvaktResource> T findbyId(String id, User user)
diff --git a/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java b/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java
index d34f968..1309458 100644
--- a/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java
+++ b/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java
@@ -657,6 +657,7 @@
                 new DateTime(param.getUriExpiration()) };
     }
 
+    @Deprecated
     public void updateUserSettings(User user, UserSettings settings)
             throws KustvaktException {
         if (user instanceof DemoUser)
@@ -674,6 +675,7 @@
         }
     }
 
+    @Deprecated
     public void updateUserDetails(User user, UserDetails details)
             throws KustvaktException {
         if (user instanceof DemoUser)
@@ -692,8 +694,26 @@
         }
     }
 
+    public <T extends Userdata> T getUserData(User user, Class<T> clazz) {
+        UserDataDbIface<T> dao = UserdataFactory.getInstance(clazz);
+        return dao.get(user);
+    }
+
+    //todo: cache userdata outside of the user object!
+    public void updateUserData(User user, Userdata data) {
+        UserDataDbIface dao = UserdataFactory.getInstance(data.getClass());
+        dao.update(data);
+    }
+
+    // todo: use getuserdata for that!
+    @Deprecated
     public UserDetails getUserDetails(User user) throws KustvaktException {
         try {
+            for (Userdata data : user.getUserdata()) {
+                if (data instanceof Userdetails2) {
+
+                }
+            }
             if (user.getDetails() == null)
                 user.setDetails(entHandler.getUserDetails(user.getId()));
         }catch (KustvaktException e) {
@@ -702,6 +722,7 @@
         return user.getDetails();
     }
 
+    @Deprecated
     public UserSettings getUserSettings(User user) throws KustvaktException {
         try {
             if (user.getSettings() == null)
diff --git a/src/main/java/de/ids_mannheim/korap/user/User.java b/src/main/java/de/ids_mannheim/korap/user/User.java
index 5c4510e..346af53 100644
--- a/src/main/java/de/ids_mannheim/korap/user/User.java
+++ b/src/main/java/de/ids_mannheim/korap/user/User.java
@@ -30,6 +30,8 @@
     private UserDetails details;
     private List<UserQuery> queries;
 
+    private List<? extends Userdata> userdata;
+
     protected User() {
         this.fields = new ParamFields();
         this.accountCreation = TimeUtils.getNow().getMillis();
@@ -58,35 +60,38 @@
 
     //todo: repair transfer
     public void transfer(User user) {
-        this.setSettings(user.getSettings());
-        this.setDetails(user.getDetails());
+        //        this.setSettings(user.getSettings());
+        //        this.setDetails(user.getDetails());
         //        this.setQueries(user.getQueries());
         if (this instanceof KorAPUser) {
-            this.getSettings().setUserID(this.id);
-            this.getDetails().setUserID(this.id);
+
+            //            this.getSettings().setUserID(this.id);
+            //            this.getDetails().setUserID(this.id);
             //            for (UserQuery q : this.getQueries())
             //                q.setOwner(this.accountID);
         }
     }
 
+    @Deprecated
     public void setDetails(UserDetails details) {
         if (details != null)
             details.setUserID(this.id);
-        this.details = details;
+        //        this.details = details;
     }
 
+    @Deprecated
     public void setSettings(UserSettings settings) {
         if (settings != null)
             settings.setUserID(this.id);
-        this.settings = settings;
+        //        this.settings = settings;
     }
 
     public void setId(Integer id) {
         this.id = id;
-        if (this.settings != null)
-            this.settings.setUserID(this.id);
-        if (this.details != null)
-            this.details.setUserID(this.id);
+        //        if (this.settings != null)
+        //            this.settings.setUserID(this.id);
+        //        if (this.details != null)
+        //            this.details.setUserID(this.id);
     }
 
     public Map<String, Object> toMap() {
@@ -95,15 +100,11 @@
         //TimeUtils.format(new DateTime(this.accountCreation))
         map.put(Attributes.ACCOUNT_CREATION, this.accountCreation);
 
-        if (this.getDetails() != null)
-            map.putAll(this.getDetails().toMap());
+        //        if (this.getDetails() != null)
+        //            map.putAll(this.getDetails().toMap());
         return map;
     }
 
-    public String toJson() {
-        return JsonUtils.toJSON(this.toMap());
-    }
-
     public Map toCache() {
         Map map = new HashMap();
         map.put(Attributes.ID, this.id);
diff --git a/src/main/java/de/ids_mannheim/korap/user/UserDataDbIface.java b/src/main/java/de/ids_mannheim/korap/user/UserDataDbIface.java
index 2d2f231..6d4e2a1 100644
--- a/src/main/java/de/ids_mannheim/korap/user/UserDataDbIface.java
+++ b/src/main/java/de/ids_mannheim/korap/user/UserDataDbIface.java
@@ -6,6 +6,8 @@
  */
 public interface UserDataDbIface<T extends Userdata> {
 
+    public Class<? extends Userdata> getType();
+
     public int store(T data);
 
     public int update(T data);
diff --git a/src/main/java/de/ids_mannheim/korap/user/UserDetailsDao.java b/src/main/java/de/ids_mannheim/korap/user/UserDetailsDao.java
index 4e16bed..0bd204d 100644
--- a/src/main/java/de/ids_mannheim/korap/user/UserDetailsDao.java
+++ b/src/main/java/de/ids_mannheim/korap/user/UserDetailsDao.java
@@ -24,6 +24,11 @@
     }
 
     @Override
+    public Class<Userdetails2> getType() {
+        return Userdetails2.class;
+    }
+
+    @Override
     public int store(Userdetails2 data) {
         String sql = "INSERT INTO user_details2 (user_id, data) VALUES (:userid, :data);";
         MapSqlParameterSource source = new MapSqlParameterSource();
diff --git a/src/main/java/de/ids_mannheim/korap/user/Userdata.java b/src/main/java/de/ids_mannheim/korap/user/Userdata.java
index 63fac27..1ffdfe1 100644
--- a/src/main/java/de/ids_mannheim/korap/user/Userdata.java
+++ b/src/main/java/de/ids_mannheim/korap/user/Userdata.java
@@ -84,4 +84,5 @@
 
     public abstract String[] requiredFields();
 
+
 }
diff --git a/src/main/java/de/ids_mannheim/korap/user/UserdataFactory.java b/src/main/java/de/ids_mannheim/korap/user/UserdataFactory.java
new file mode 100644
index 0000000..43000e1
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/user/UserdataFactory.java
@@ -0,0 +1,62 @@
+package de.ids_mannheim.korap.user;
+
+import de.ids_mannheim.korap.config.BeanConfiguration;
+import de.ids_mannheim.korap.config.KustvaktClassLoader;
+import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author hanl
+ * @date 27/01/2016
+ */
+public class UserdataFactory {
+
+    private static final Map<Class<? extends Userdata>, UserDataDbIface> instances = new HashMap<>();
+
+    private UserdataFactory() {
+    }
+
+    public static Class<? extends UserDataDbIface> getClass(
+            Class<? extends Userdata> data) {
+        Set<Class<? extends UserDataDbIface>> c = KustvaktClassLoader
+                .loadSubTypes(UserDataDbIface.class);
+        for (Class<? extends UserDataDbIface> o : c) {
+            Type type = o.getGenericInterfaces()[0];
+            if (type instanceof ParameterizedType) {
+                ParameterizedType ptype = (ParameterizedType) type;
+                Class ctype = (Class) ptype.getActualTypeArguments()[0];
+                if (ctype.equals(data))
+                    return o;
+            }
+        }
+        return null;
+    }
+
+    public static UserDataDbIface getInstance(Class<? extends Userdata> data) {
+        if (instances.get(data) == null) {
+            Class<? extends UserDataDbIface> cl = getClass(data);
+            if (BeanConfiguration.hasContext()) {
+                try {
+                    Constructor c = cl.getConstructor(PersistenceClient.class);
+                    UserDataDbIface iface = (UserDataDbIface) c.newInstance(
+                            BeanConfiguration.getBeans()
+                                    .getPersistenceClient());
+                    instances.put(data, iface);
+                    return iface;
+                }catch (NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException e) {
+                    return null;
+                }
+
+            }
+        }else
+            return instances.get(data);
+        return null;
+    }
+}
diff --git a/src/test/java/de/ids_mannheim/korap/config/ConfigTest.java b/src/test/java/de/ids_mannheim/korap/config/ConfigTest.java
index d4f2ad5..ded5cff 100644
--- a/src/test/java/de/ids_mannheim/korap/config/ConfigTest.java
+++ b/src/test/java/de/ids_mannheim/korap/config/ConfigTest.java
@@ -6,6 +6,8 @@
 import de.ids_mannheim.korap.security.ac.ResourceFinder;
 import de.ids_mannheim.korap.user.Attributes;
 import de.ids_mannheim.korap.user.User;
+import de.ids_mannheim.korap.user.UserdataFactory;
+import de.ids_mannheim.korap.user.Userdetails2;
 import de.ids_mannheim.korap.utils.ServiceVersion;
 import de.ids_mannheim.korap.utils.TimeUtils;
 import org.junit.After;
@@ -76,6 +78,11 @@
         BeanConfiguration.getBeans().getEncryption()
                 .validateEntry(v, Attributes.EMAIL);
     }
+
+    @Test
+    public void testTypeReference() {
+        UserdataFactory.getInstance(Userdetails2.class);
+    }
 }
 
 
