added code to write the predicted points so it doesn't need to be rerun each time.