simple pattern generator