refactoring for #195