refactored index a bit
Merge branch 'refactor_test'