Added online inference.