Trying to generate patterns