implement inference for Index