final implementation

Added credit card detection function and validation function based on Luhn algorithm.