modify flag_pass to check_status