started solving memory leak