using regex to detect card type
renamed luhn algorythm check function to facilitate self documentation