fixes Memory Optimization project (Java.MP.C4.M1.MemoryManagement 2)