Undercover cop helps nab suspect