test_4 works, no idea why. still leaking memory