added prediction functionality