serializing tuples and freeing memory implemented