refactored each w index