multi-pattern support added