refactored location index