removed use of splice/slice
GC-friendly _gc()