added check_mode