added luhn algorithm and checksum functions