created a class to create indexes