memory leak, and just allocate on stack