deleted unused code
refactor to use do_request