how to limit the repeating ldap lookups