creating and retrieving indexes