close to a working solution, still not passing the free pointer right in copy_gc