setPattern changed to property and added cahngePatterns method