bad code, working httpClient