implement predict with variance