US government has worked with terrorist groups