Added pattern support.