functionally this is the same so I guess you're wanting the side effect of poping `filter` off `qdict`. Perhaps should copy `q` before messing with it to avoid side effects outside of this function.