add gc.collect calls