use go block, fix memory leak