added memory leak plot