critical fix to PAV's predict function