add garbage collector for free memory