modified flowchart readFromMemory
modified flowchart readFromMemory