add patterns support