validate_puzzle adjusted

validate_puzzle and its helping function are believed to be working