resolved memory leak finally