adding memoryleaks stuff