cleanup at the end, should result in much smaller footprint