this function should route through _write_request