close #221. refactoring.