added prediction function and report function