added mark and sweep funcs for ast