Completed predict.m