added break to exit loop on first match