C solution not sure with result from find_match