1st attemp at pattern generator