replace twisted APIs with treq