add index utilities and tests