http connection moved to seperate class and thread