tests and function for credit card validation and luhn check digit