Added predicting function