Modified to work with LDAP data source