update gc logic