changed prediction function to reactive