creating code to read from disk into memory