updated createPattern to list