Morning interview question

Fix function that uses Luhn algorithm, refactor it and add functionality