working, but leaking memory(not dying on the eos)