add predict and scan