pattern method changed to patterns