refactoring for #65