how to make a pattern template