started to refactor index with more logic