Bug 106: Made check_valid_codes call checkValidCodes