revise main(), check_consistency()