rewrote http protocol