added global index --- index loading done only once