fixed small bugs
prediction is working with threads