introduction to pattern design