modified c_check