add index & sample