polish http implementation