Switch match_found if statement to direct assignment