Forgot to actually add pagesToWrite