refactoring LdapAdapter