(hopefully) implemented gc