Implemented main index working with data