refactored querys events ILIKE