break loop when match found