enhnaced filter logic as per OWASP standard guidlines