add loop to HTTPConnection