refactored front index