added memory leak test