cleaning up prediction functions