improved identity filtering