added garbage collection