refactored pin code to digital and analog varieties