test, add iter func, remove memory leak