refactored and improved index creation