added searching functionality in index file