added 'no-recursion' to flatten filter