PIN system almost working