Modified predict method