refactor, close #2