Implemented some part of index creation