implemented garbarge collection