this can all be replaced with `this.setWindow(res.value[res.value.length - 1], cb);`