refactor completeagent feature
refactor leaveempty feature
refactor stat closed feature