now also executing custom commands when given a pattern and not only when provided with one