implement and test GC