PinPattern code added back in