adding function to check digits, and using it for positions 3 and 4
comment fix