code refactor
add manual GC