add back httpinputstream and correct error handling
update names