Figured out pattern generator