creating an IndexManager interface to make everything clearer