modifying http client to new api