work on surrogate refactor and ldap integration