updated read from disk. Memory running out so need a smarter way