fix do_request method