add more tests but find where memoryleak is