Update prediction function