fix #25 refactoring