improved index creation