diff --git a/src/Gica/MongoDB/Selector/Filter/Logical/AndGroup.php b/src/Gica/MongoDB/Selector/Filter/Logical/AndGroup.php
index <HASH>..<HASH> 100644
--- a/src/Gica/MongoDB/Selector/Filter/Logical/AndGroup.php
+++ b/src/Gica/MongoDB/Selector/Filter/Logical/AndGroup.php
@@ -19,6 +19,13 @@ class AndGroup implements Filter
         $this->filters = $filters;
     }
 
+    public function withAddedFilter(Filter $filter):self
+    {
+        $other = clone $this;
+        $other->filters[] = $filter;
+        return $other;
+    }
+
     public function getFields():array
     {
         $filterExpressions = [];
diff --git a/src/Gica/MongoDB/Selector/Filter/Logical/OrGroup.php b/src/Gica/MongoDB/Selector/Filter/Logical/OrGroup.php
index <HASH>..<HASH> 100644
--- a/src/Gica/MongoDB/Selector/Filter/Logical/OrGroup.php
+++ b/src/Gica/MongoDB/Selector/Filter/Logical/OrGroup.php
@@ -19,6 +19,13 @@ class OrGroup implements Filter
         $this->filters = $filters;
     }
 
+    public function withAddedFilter(Filter $filter):self
+    {
+        $other = clone $this;
+        $other->filters[] = $filter;
+        return $other;
+    }
+
     public function getFields():array
     {
         $filterExpressions = [];
added \Gica\MongoDB\Selector\Filter\Logical\OrGroup::withAddedFilter