add functions to manage indexes