memory leak, just allocate on stack instead