add test patterns, works well