almost done, printing predictions returns seg fault