Refactor prediction