works until predict