loading index data from disk added
refactoring