update for memory leak