Added prediction function